Unreviewed
Create a toast store. Export one as your app singleton and drive it from anywhere; bind it to a mounted region with <Toaster toaster={…} />. Most apps use the built-in default, Toaster.manager, and a bare <Toaster />.
<Toaster toaster={…} />
Toaster.manager
<Toaster />
export const toaster = createToaster()toaster.add(() => <Card>Saved</Card>, { placement: 'bottom-right' }) Copy
export const toaster = createToaster()toaster.add(() => <Card>Saved</Card>, { placement: 'bottom-right' })
Create a toast store. Export one as your app singleton and drive it from anywhere; bind it to a mounted region with
<Toaster toaster={…} />. Most apps use the built-in default,Toaster.manager, and a bare<Toaster />.