fkhadra / fkhadra/react-toastify
Cannot update toast before queue shows it
- Dominant language
- TypeScript
- Stars
- 13.4k
- Forks
- 741
- PR merge metrics
- No merged PRs in 30d
Description
When there is a limit to the number of toasts displayed, if I create a toast that cannot be displayed yet and I try to update it, when the toast appears, it is in the state that created it not the updated state.
Steps to reproduce:
1. Set a limit to the number of toasts displayed (3 toasts)
2. Create 4 toasts sequentially
3. After creating the fourth toast, update it
Bug: the fourth toast never updates.
[](https://codesandbox.io/s/silent-dawn-2c2rm?fontsize=14&hidenavigation=1&theme=dark)
The toasts not displayed yet and are in the queue should also update
Tested on:
"@babel/runtime": "7.13.8",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-scripts": "4.0.0",
"react-toastify": "7.0.3"
Contributor guide
Assessment
This issue has not been assessed yet.