react-redux-toastr: Warning: Function components cannot be given refs. Attempts to access this ref will fail.
I’m getting a warning in my console output since upgrading my application to react v16 and react-redux-toastr to v7.4.5.
This occurs when I use toastr.confirm – it looks like it is the toastr confirmation buttons that are causing the issue.
Warning: Function components cannot be given refs. Attempts to access this ref will fail.
Check the render method of `ToastrConfirm`.
in ReduxConfirmButton (created by ToastrConfirm)
in div (created by ToastrConfirm)
in div (created by ToastrConfirm)
in div (created by ToastrConfirm)
in ToastrConfirm (created by ReduxToastr)
in span (created by ReduxToastr)
in ReduxToastr (created by Connect(ReduxToastr))
in Connect(ReduxToastr) (created by App)
in div (created by App)
in Provider (created by App)
in App (created by Connect(App))
in Connect(App)
in AppContainer
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 21 (4 by maintainers)
Commits related to this issue
- #220 fix: stateless ref — committed to diegoddox/react-redux-toastr by diegoddox 5 years ago
Confirmed here as well.
7.4.9 version works for me with React 16.8.3 @diegoddox
Thanks everyone, this should be fixed on the latest. Can someone confirm for me?
@diegoddox Yes I have faced that issue but I’ve solved this issue and also gave the solution. Which is on the above comment. I am using React version - 16.6.0