Skip to content

Conversation

@byronanderson
Copy link

react-list uses react's componentWillReceiveProps lifecycle, which has been deprecated in favor of componentDidUpdate and getDerivedStateFromProps for compatibility with async rendering (see here).

This is my stab at upgrading to the concurrent rendering safe API, not really knowing how react-list works but understanding how the refactoring from componentWillReceiveProps to getDerivedStateFromProps typically works.

This changeset attempts to maintain a good amount of backwards compatibility by polyfilling getDerivedStateFromProps using react-lifecycles-compat. Unfortunately, react-lifecycles-compat only targets react >= 0.14.9, leaving users of react-list using React between 0.14.0 and 0.14.8 out of luck.

also adds polyfill for older react versions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants