React-toastify: Warning: 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. Learn more about using refs safely here:

Created on 31 Mar 2020  路  4Comments  路  Source: fkhadra/react-toastify

The latest release of the React has added StrictMode functionality.

StrictMode is a tool for highlighting potential problems in an application. Like Fragment, StrictMode does not render any visible UI. It activates additional checks and warnings for its descendants.

So now it throws an error while using a toast function

image

duplicate

Most helpful comment

Hey @tumdav,

The new RC of react-toastify support strict mode. You can install it as follow:
yarn add react-toastify@next or npm i react-toastify@next

I expect to launch the stable release next week if there is no bug.

All 4 comments

the error is not coming from react-toastify but from react-transition-group https://github.com/fkhadra/react-toastify/issues/388

Hey @tumdav,

The new RC of react-toastify support strict mode. You can install it as follow:
yarn add react-toastify@next or npm i react-toastify@next

I expect to launch the stable release next week if there is no bug.

@fkhadra seems it does not work for me, I am getting the same error in the console

Release version : "react-toastify": "^6.0.0-rc.2"

image

I'm personally no longer seeing this with react-toastify": "^6.0.0-rc.3",

Was this page helpful?
0 / 5 - 0 ratings

Related issues

giocodes picture giocodes  路  3Comments

SmileSydney picture SmileSydney  路  4Comments

tobiasfriden picture tobiasfriden  路  3Comments

jorgecuesta picture jorgecuesta  路  5Comments

fkhadra picture fkhadra  路  4Comments