r/reactnative • • Sep 08 '20

Just published react-native-fast-toast, cross-platform Toast component for react-native

236 Upvotes

36 comments sorted by

View all comments

4

u/DjWithNoNameYet Sep 08 '20

Is it possible to create this as a react hook (useToaster) or global function? So you can have a singleton high up in the app structure and you just call toastGlobal.current.show('Task finished successfully', { type: 'success' }) Then you don't need to have the <Toast/> component everywhere in your app.

1

u/alirezarzna Sep 30 '20

I've just added hook support, check readme for details.