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

React 17 support #171

Closed
catamphetamine opened this issue Apr 2, 2018 · 2 comments
Closed

React 17 support #171

catamphetamine opened this issue Apr 2, 2018 · 2 comments

Comments

@catamphetamine
Copy link

React 17 removes componentWillMount and context API.
I can see your router uses both.
I'm creating this issue as a source of info on the status of React 17 support for those who're interested.
If you will be planning to release a React 17 compatible version when the time comes you can drop a comment here.
There are two polyfills for non-breaking changes:
https://github.com/reactjs/react-lifecycles-compat
https://github.com/jamiebuilds/create-react-context
But the second polyfill only supports React 16

@taion
Copy link
Contributor

taion commented Apr 2, 2018

I do plan on switching to those APIs. At the moment for backward-compat reasons I can't quite do so yet. Probably by the next minor that adds the deprecation warnings in React 16.

@m4rcelofs
Copy link

Do note that warnings are already shown if running in StrictMode:

Warning: Unsafe lifecycle methods were found within a strict-mode tree:
    in StrictMode (at App.js:9)
    in App
    in ElementsRenderer
    in StaticContainer
    in StaticContainer (created by BaseRouter)
    in BaseRouter (created by ConnectedRouter)
    in ConnectedRouter (created by FarceRouter)
    in Provider (created by FarceRouter)
    in FarceRouter (at src/index.js:18)

componentWillReceiveProps: Please update the following components to use static getDerivedStateFromProps instead: Link

componentWillUpdate: Please update the following components to use componentDidUpdate instead: Link

Learn more about this warning here:
https://fb.me/react-strict-mode-warnings

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

No branches or pull requests

3 participants