Fixed shallow renderer regression (introduced in 3.0.3) that caused setState updater to fail due to incorrect this. (#26)
Fixed an edge case bug where a batched update containing both a setState updater and a parent re-render could result in dropped state updates. (#24)
Replaced an unintentional template literal to ensure broader browser compatibility. (ce42fe4)
Replaced a few unintentional let keywords with var to ensure broader browser compatibility. (#17)
Throw an error for any polyfilled component that mixes old lifecycles (componentWillMount, componentWillReceiveProps, or componentWillUpdate) and new lifecycles (getDerivedStateFromProps or getSnapshotBeforeUpdate) as React 16.3+ does not support this case and will not invoke the old lifecycles. This error ensures consistent behavior between React 16.3+ and older versions. (#14)
Add a DEV mode warning for any polyfilled component that mixes old lifecycles (componentWillMount, componentWillReceiveProps, or componentWillUpdate) and new lifecycles (getDerivedStateFromProps or getSnapshotBeforeUpdate) as React 16.3+ does not support this case and will not invoke the old lifecycles. This warning ensures consistent behavior between React 16.3+ and older versions. (#15)
Package uses a named export and includes an ES6 module build. (#11)
// 1.x (before)
import polyfill from 'react-lifecycles-compat';
// 2.x (after)
import {polyfill} from 'react-lifecycles-compat';
Improved handling of falsy return values from polyfilled getSnapshotBeforeUpdate() lifecycle. #12