You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you want to request a feature or report a bug?
Report a bug
What is the current behavior?
When using <Transition /> inside of <React.StrictMode />, warnings are logged about findDOMNode and the legacy context API (as of React 16.6)
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via CodeSandbox.
View the console at https://codesandbox.io/s/y0r3kl6x1j. On mount, you'll see:
Warning: Legacy context API has been detected within a strict-mode tree
and after clicking "Toggle in Prop", you'll see:
findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Transition which is inside StrictMode. Instead, add a ref directly to the element you want to reference.
What is the expected behavior?
No warning should be logged.
Which versions, and which browser / OS are affected by this issue? Did this work in previous versions?
These warnings are new as of React 16.6.
Wsiegenthaler, edmorley, ntamas, urikphytech, flundermicha and 66 more