:boom: Puts your console on blast when React is making unnecessary updates.
Made sure we don't monkey patch components at all if they are excluded or not included. (#43, #44) thanks @astik
Now using react-fast-compare to make deep comparisons of react props to detect props which are different by reference but equal by value.
We decided to use it to fix the library's performance issues (#30)
Fixed handling of old and new context api in functional components. (#39)
Fixed support of React's 16 snap
argument in componentDidUpdate
.
Thanks @kyo-ago
Added a test to ensure extended class and functional components are not swallowing statics.
We implemented a new monkey patch which was written by @danburzo. Thank you!
This patch allows us to track updates in components with custom componentDidUpdate
and on Functional Components. (fixing #10 and #17)
It works by monkey patching React.createElement
instead of React.Component
and:
componentDidUpdate
inheriting from the originals and using the extended version instead of the original one.let WDYUFunctionalComponent = class extends YourReactComponent {
render() {
return ctor(this.props);
}
componentDidUpdate(prevProps, prevState) {
cdu.call(this, prevProps, prevState);
}
}
componentDidUpdate
and using the wrapper to create the element instead of the functional component.We decided to release it as a major release since we expect it might work a little different then usually tracking more components then previously and (i hope not) braking some components because of the wrapping.
316 KB
, 59.7 KB minified
13.89 KB
, 4.82 KB minified
.