nandorojo / burnt

Crunchy toasts for React Native. 🍞
MIT License
1.16k stars 36 forks source link

Add Web Toast #7

Closed mrzmyr closed 1 year ago

mrzmyr commented 1 year ago

@nandorojo you were thinking of something with radix-ux Toast?

Alternatives:

nandorojo commented 1 year ago

It’s tough to say. Part of me wants to use Zeego to implement this part. I don’t love the Radix API for Toasts. It’s a bit too declarative for my liking. Hot Toast looks great, just have to decide which features to support.

chrisarts commented 1 year ago

React hot toast its really lite, and probably mixing it with externalStore to avoid using provider could achieve the same behaviour you have on android and iOS.

this is made using the headless module like this: import toast, { useToaster } from 'react-hot-toast/headless';

Screenshot 2023-01-17 at 1 50 51 PM

nandorojo commented 1 year ago

For what it's worth: Tamagui has implemented a Toast component which uses Burnt on native (optionally). This was my original vision, and I think it may be the correct behavior for Burnt. But I might add support for Sonner on Web, even though its APIs are quite different.

nandorojo commented 1 year ago

Web support has been added in 0.11: https://github.com/nandorojo/burnt/releases/tag/v0.11

mrzmyr commented 1 year ago

❤️