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

Warnings in StrictMode #6382

Closed
Gvozd opened this issue Oct 9, 2018 · 1 comment
Closed

Warnings in StrictMode #6382

Gvozd opened this issue Oct 9, 2018 · 1 comment

Comments

@Gvozd
Copy link

Gvozd commented Oct 9, 2018

Version

react-router-dom: 4.3.1
react: 16.5.2

Test Case

https://codesandbox.io/s/m3nz3jy13j

Steps to reproduce

Wrap Application with <StrictMode>

Expected Behavior

No warnings in console.

Actual Behavior

Warning in console

Warning: Unsafe lifecycle methods were found within a strict-mode tree:
    in StrictMode (created by BasicExample)
    in BasicExample

componentWillMount: Please update the following components to use componentDidMount instead: BrowserRouter, Route, Router, Switch

componentWillReceiveProps: Please update the following components to use static getDerivedStateFromProps instead: Route, Router, Switch

Learn more about this warning here:
https://fb.me/react-strict-mode-warnings
@Gvozd
Copy link
Author

Gvozd commented Oct 9, 2018

Sorry, Dupe of #6060

@Gvozd Gvozd closed this as completed Oct 9, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Dec 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant