preact.esm.js, line 703
if (inst && inst.constructor === childComponent && childProps.key == inst.__key) {
My application have an issue - unnecessary react-redux connected component unmount at app startup. I sure that the component keys remain same and component/element stays same. During debugging, i see that at line 703 childProps.key whas always undefined, despite of I declared it in component props.
I try to build a simplifier test case, but wanna ask - is this line of code covered by tests?
Hmm - are you diffing against an SSR-generated DOM?
Nope. Just using preact, redux and react-redux connector.
The issue occurs on "connected" components after redux state updates.
And I get a remounts instead of updates. How can i fiddle test case (which service to use)?
Just to add more info here. On removing the key on the component in a list, it starts updating the component on redux state update like it should instead of mount and unmount when key was present.
any progress?
There will be an announcement regarding keys shortly :)
A lot of fixes with keys have landed in master in the past few days. The last known issues will be resolved with #1440 . In my testing I was not able to find any further issues with keys. Feel free to ping us if the issue isn't resolved with our next release (beta or alpha.5) :+1:
Most helpful comment
There will be an announcement regarding keys shortly :)