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
Toaster push is showing unexpected behaviour when called from useEffect #2336
Comments
hi @utkarsh-alphonso , can you reproduce your problem with codesandbox? |
@simonguo I have the same issue. Any workaround? https://codesandbox.io/s/festive-wozniak-vk379?file=/src/index.js Edit: if you comment the line 14 on this sandbox and click the button, you will see the message: |
maxpou
added a commit
to maxpou/rsuite
that referenced
this issue
Feb 14, 2022
maxpou
added a commit
to maxpou/rsuite
that referenced
this issue
Feb 14, 2022
maxpou
added a commit
to maxpou/rsuite
that referenced
this issue
Feb 14, 2022
maxpou
added a commit
to maxpou/rsuite
that referenced
this issue
Feb 15, 2022
simonguo
pushed a commit
that referenced
this issue
Feb 17, 2022
Closed via #2353 |
plmercereau
added a commit
to nhost/nhost
that referenced
this issue
Apr 3, 2022
and remove workaround related to rsuite/rsuite#2336
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of rsuite are you using?
5.5.2
What version of React are you using?
17.0.0
What version of TypeScript are you using (if any)?
No response
What browser are you using?
Chrome
Describe the Bug
In the useEffect of my form component, I trigger a notification for successful/unsuccessful submit. With rsuite v4, I had it working fine. But as soon as I migrated to v5, replacing the earlier Notification format with the one using toaster - I am encountering a bug as follows:
Uncaught TypeError: Cannot read properties of null (reading 'push')
which points to the line
return container.current.push(message)
(inside the toaster.push function)
Some other observations: If I trigger the notification from a button callback - it works. Infact once I trigger it from a callback, even the useEffect triggers work fine. Please help!
Expected Behavior
No response
To Reproduce
No response
The text was updated successfully, but these errors were encountered: