fkhadra / fkhadra/react-toastify

Unexpected behavior with combination: update & limit

Open
#824 3 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.