haxe-react
haxe-react copied to clipboard
Add compilation error when mixing component lifecycle methods
React will give the following runtime error:
Warning: Unsafe legacy lifecycles will not be called for components using new component APIs.
MyComponent uses getDerivedStateFromProps() but also contains the following legacy lifecycles:
componentWillMount
The above lifecycles should be removed. Learn more about this warning here:
https://fb.me/react-unsafe-component-lifecycles
These could (and should) be catched at compile time.