react: 19.2.4
toastify: 11.0.5
Screen.Recording.2026-02-11.at.17.58.55.mov
reading the code, dismiss does markAsRemoved https://github.com/fkhadra/react-toastify/blob/main/src/core/containerObserver.ts#L52
it does not really remove the toast. the onChange does not fire either https://fkhadra.github.io/react-toastify/listen-for-changes
next time toast() is triggered, the onChange fires with the new toast status: added and then after that one the previous one is really removed with status: removed. this causes the behavior in the video.
the code seems that it should work nonetheless but I am guessing thats due to react: 19.2.4
the listeners has the following:
function() { checkIfSnapshotChanged(inst) && (startUpdateTimerByLane(2, "updateSyncExternalStore()", fiber), forceStoreRerender(fiber)); }
from the react-dom source code:
function subscribeToStore(fiber, inst, subscribe) {
return subscribe(function() {
checkIfSnapshotChanged(inst) && (startUpdateTimerByLane(2, "updateSyncExternalStore()", fiber), forceStoreRerender(fiber));
});
}
most likely has to do with how react 19 uses https://react.dev/reference/react/useSyncExternalStore
I also noticed that it bugs out with multiple toasts
got no reproducable link unfortunately.
patches
add the below to onClose of the options passed for the toast
toast.update('THE ALERT ID', {
render: () => null,
containerId: 'THE CONTAINER ID', //remove when not using containers
})
react: 19.2.4toastify: 11.0.5Screen.Recording.2026-02-11.at.17.58.55.mov
reading the code, dismiss does
markAsRemovedhttps://github.com/fkhadra/react-toastify/blob/main/src/core/containerObserver.ts#L52it does not really remove the toast. the
onChangedoes not fire either https://fkhadra.github.io/react-toastify/listen-for-changesnext time
toast()is triggered, theonChangefires with the new toaststatus: addedand then after that one the previous one is really removed withstatus: removed. this causes the behavior in the video.the code seems that it should work nonetheless but I am guessing thats due to
react: 19.2.4the listeners has the following:
from the
react-domsource code:most likely has to do with how react 19 uses https://react.dev/reference/react/useSyncExternalStore
I also noticed that it bugs out with multiple toasts
got no reproducable link unfortunately.
patches
onCloseof the options passed for the toast