fkhadra / fkhadra/react-toastify

Cannot update toast before queue shows it

Open
#575 5 comments 3 reactions 1 assignee Claimed by @fkhadra View on GitHub
Feature Request
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.

[![Edit silent-dawn-2c2rm](https://codesandbox.io/static/img/play-codesandbox.svg)](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

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.