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
But react-toastr uses createFactory function, so it causes a warning.
Warning: React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.
We use the forked package, but we still use React v16 due to another problem.
I do not have a plan to maintain the forked package for the long term because we're considering switching another toast library from react-toastr. So, I recommend creating another fork if someone wants to maintain it.
Problem
React.createFactory
has been deprecated since React v16.13.0.https://github.com/facebook/react/releases/tag/v16.13.0
https://reactjs.org/docs/react-api.html#createfactory
But
react-toastr
usescreateFactory
function, so it causes a warning.react-toastr/src/components/ToastContainer.jsx
Line 49 in fcd3b4b
Solution idea
I think we can just replace it with a function component.
For example:
The React documentation also recommends this solution.
If you like this idea, I'll open a pull request with the patch.
Thanks!
The text was updated successfully, but these errors were encountered: