Closed Porl91 closed 7 years ago
Updated the issue to explain that this appears to affect all lifecycle functions for stateful (presumably also stateless) components that accept component properties / state as parameters.
This has been fixed and an updated (still pre-release, though this issue only affected the pre-release versions) package deployed to NuGet.
I think that this issue was also affecting the PureComponent's "ShouldComponentUpdate" implementation - essentially disabling it. I have added a unit test for this ("PureComponent re-rendered with equivalent props should not have to re-render") that failed before the fix and now passes.
The props / state arguments passed to stateful components 'ComponentDidUpdate', 'ComponentWillUpdate' and 'ShouldComponentUpdate' lifecycle methods are passed wrapped in a javascript object.
The Console.WriteLine in the ShouldComponentUpdate method prints the following to the console:
Actual:
Expected: