JsCommunity / JsCommunity/reaclette
`initialize` happen in child before parent
Open
@julien-f is already working on this.
Since Nov 23, 2018.
bug
- Dominant language
- JavaScript
- Stars
- 2
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
The problem comes from the fact that componentDidMount is executed first in children then in parents.
Main issue: the child state can use the parent state before it's initialized.
Derived issue: the parent state can be updated (due to a child) before the parent injectState has subscribed to it, therefore the parent component will not be re-rendered.
Possible solution: if the child state has a parent, defer the call to initialize after the one of the parent.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.