Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
emilengelin opened this issue Sep 30, 2020 · 0 comments
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@emilengelin
Copy link
Owner

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.
@emilengelin emilengelin added bug Something isn't working documentation Improvements or additions to documentation labels Sep 30, 2020
@emilengelin emilengelin self-assigned this Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant