Open JobberRT opened 2 months ago
I know there's a toast.update()
function that I can use, but that will require the darkMode
to be passed to every sub components(and their sub components too), and use it like
useEffect(()=>{toast.update(toastId, {theme: <THE CONDITION>})},[darkMode])
I have a usage like this:
Example condition
At default,
darkMode
is false, so theToastContainer
istheme=colored
. A toast is created and will not auto close(For example, a "You Got A New Message" toast). Later,darkMode
is changed(by user or by system time), the created toast will not rerender itself todark
like other component, it will keep as acolored
toast, only newly created toast will apply the newdark
value.Does
toastify
listen totheme
change and rerender thetoast
? If not, will this feature be added?