Closed iambumblehead closed 5 years ago
Hi @iambumblehead, how are you?
react-toastify doesn't use those API's so the problem is not here.
Checking the library react-transition-group, it stopped to use componentWillMount
and componentWillReceiveProps
on v2.4.0 which is the minimal dependency for react-toastify
:
The problem might be with Inferno's render.
It is quite extra info for this issue but:
Checking the source code for react-transition-group
on node_modules
the library is compiled to a version that is using componentWillMount (probably for compatibility) and some flags are set to suppress warnings (which react render interprets that but Inferno doesn't)
// React may warn about cWM/cWRP/cWU methods being deprecated.
// Add a flag to suppress these warnings for this special case.
componentWillMount.__suppressDeprecationWarning = true;
componentWillReceiveProps.__suppressDeprecationWarning = true;
componentWillUpdate.__suppressDeprecationWarning = true;
You can check this on node_modules/react-transition-group/dist/react-transition-group.js
Hopefully, it might help you in some way. ;)
@alanlima thank you so much for spending the time to make this nice response :)
@iambumblehead No worries, happy to help 🤗
@alanlima thanks for answering !
Do you want to request a feature or report a bug?
Both. When using inferno with the latest version of redux and toastify, this warning is shown in the console,
Those functions will be deprecated in future version of react, and inferno renders a big red warning message when it discovers them in react-toastify.