-
-
Notifications
You must be signed in to change notification settings - Fork 298
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
findDOMNode is deprecated in StrictMode #257
Comments
the same question |
Same here |
1 similar comment
Same here |
Seems to be working here: https://codesandbox.io/s/delicate-hill-p25hr Unfortunately without a reproduction example I'm unable to help. |
I can reproduce it here in your example: https://codesandbox.io/s/eager-haze-fkn0w?file=/index.js otherwise chagne index.jsx render to:
Hope this helps :) |
I see the warning now. If anything this is an issue with Many thanks. |
Is there any solution to this besides disabling Strict Mode? |
For anyone using MaterialUI, I got around this by wrapping the ThemeProvider around SnackbarProvider: <React.StrictMode>
<ThemeProvider theme={theme}>
<SnackbarProvider maxSnack={3}>
<App />
</SnackbarProvider>
</ThemeProvider>
</React.StrictMode>, |
I am using MaterialUI, The warning is still there after wrapping the ThemeProvider around SnackbarProvider. This is also advised on official documentation. Note: If you're using material-ui ThemeProvider, make sure SnackbarProvider is a child of it. |
A solution is here - https://stackoverflow.com/a/66290597/984471 |
This is an issue of MaterialUI library, and there's a temporary solution here before the new MaterialUI v5 is officially released. |
Try to use notistack in functional component.
Expected Behavior
Should now throw a warning.
Current Behavior
React.strictmode creates warning
Steps to Reproduce
Versions:
to me
Let me know if I need to provide more info.
The text was updated successfully, but these errors were encountered: