Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[phase 1] deprecate react 15, fix lifecycle warnings in 16.9 #487

Merged
merged 6 commits into from
Sep 6, 2019

Conversation

hshoff
Copy link
Member

@hshoff hshoff commented Sep 6, 2019

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:

  • Phase 1 rename legacy lifecycle methods with 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.
  • Phase 2 migrate away from legacy lifecycle methods and remove 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

  • [text] peerDep react@^16.3, deprecate react 15
  • [text] prefix lifecycle methods with UNSAFE_
  • [axis] peerDep react@^16.3, deprecate react 15 due to @vx/text dep
  • [demo] use react 16.9
  • [demo] prefix lifecycle methods with UNSAFE_

🏠 Internal

  • [internal] update deps: coveralls, lint-staged, marked

@hshoff hshoff added this to the v0.0.191 milestone Sep 6, 2019
Copy link
Collaborator

@williaster williaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice. I don't thiiiink this will conflict with the build refactor either 🤞

@hshoff hshoff merged commit 4f33da5 into master Sep 6, 2019
@hshoff hshoff deleted the harry-16 branch September 6, 2019 19:30
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.

3 participants