Render more than string
You can render any valid ReactNode: string, number, component... This is really straightforward.
Basic example
TIP
When you render a component, a closeToast
prop and the toastProps
are injected into your component.
TIP
You can also write with a tsx component. that is cool!!
Example with pinia
In this example we will use pinia to share state accross a component and a toast. Increment and display a toast at the same time to see how the state stay in sync !