fkhadra / fkhadra/react-toastify
Unexpected behavior with combination: update & limit
Open
Feature Request
- Dominant language
- TypeScript
- Stars
- 13.4k
- Forks
- 741
- PR merge metrics
- No merged PRs in 30d
Description
When you try following code when toast container have set limit=1, expected behavior should be same in both runs, but it is not, in the second run it shows fist message and not last (updated):
```
function onClick() {
const id = toast.success('a')
toast.update(id, {render: 'b'})
toast.update(id, {render: 'c'})
}
onClick();
onClick();
```
During first "onClick()" run is eventually (instantly) showed 'c'
After close (manually or after time out), second "onClick()" show 'a' (even twice - but this can be related with another issue)
Contributor guide
Assessment
This issue has not been assessed yet.