Issue with understanding-reacts-key-prop
a-c-sreedhar-reddy opened this issue · 1 comments
a-c-sreedhar-reddy commented
For components, this means that React will run cleanup on effects (or componentWillUnmount), then it will run state initializers (or the constructor) and effect callbacks (or componentDidMount).
But effects do not work that way. First the new Component is rendered. Then cleanup on old effects is done. Then new effects are run.
kentcdodds commented
Yeah, I'll clarify that wording a bit.