[phase 1] deprecate react 15, fix lifecycle warnings in 16.9 #487
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related: #431 (comment)
React 16.9 introduces console warnings in DEV-mode for the following lifecycle methods:
componentWillMount
componentWillReceiveProps
componentWillUpdate
These methods continue to work, but react DEV-mode will pollute consoles with warnings that are not actionable on vx users part. To address this and get vx ready for React 17 there will be 2 phases:
UNSAFE_*
prefix. This requires react peerDeps of^16.3
. This will remove the console warning pollution. This will also drop support for react 15 for packages that use UNSAFE. This is the short-term fix.UNSAFE_*
. This is the long-term fix.Why break these into two phases? There are two distinct problems that need addressing: console warning pollution and legacy lifecycle migration. Addressing the first in phase 1 solves most the most pressing problem of console warnings in dev when using 16.9. The long-term fix has the potential to introduce bugs so I'd like to untangle the two problems.
What does this mean for you? If you use:
@vx/text
@vx/axis
@vx/vx
you will need to be on React 16.3 or greater.Thanks to @dagda1 @boom @denkristoffer for raising the issue with
@vx/text
. We'll review and follow up on the related open PRs in phase 2 (#431, #486)💥 Breaking Changes
react@^16.3
, deprecate react 15UNSAFE_
react@^16.3
, deprecate react 15 due to @vx/text depUNSAFE_
🏠 Internal