Skip to content

Inspecting parent React components that pass props into child components using useDOA on given props causes missinformative component UI #6

@emilengelin

Description

@emilengelin

How to re-create:

  1. Create a container component.
  2. Use useState([...]) with custom objects inside.
  3. Render a new component inside the container which takes an object as a prop (an array element from the container's state).
  4. Pass the prop given to the child to the child's useDOA hook. In child component: useDOA(props.obj).
  5. Use a reactive component inside the child which updates one of the DOA-object fields (eg. map.number.set(obj.number + 1)).
  6. Interact with the reactive component.
  7. Inspect the container component's hooks => the hook should update once or a couple of seconds after interacting with the reactive component in a given child component.
  8. Inspect the child component's hooks. (!!!)
  9. The reactive component should not update the child anymore. <--- This is the bug.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentation

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions