You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever I import toast from "react-hot-toast/headless" and call toast('some message here'), I don't see a toast message.
Here's my code:
Sample.tsx where the toast function is used.
exportconstSample=()=>{constcallToast=()=>{toast("Message to be shown");}return(<ViewclassName="flex flex-1 h-full w-full items-center justify-center"><ViewclassName='w-1/2 mt-5'><ButtononPress={callToast}>Toast</Button></View></View>)}
Thanks for the quick reply @timolins
After debugging I noticed no toast object is being added to the toasts list in useToaster, so nothing is mapped for the updateHeight to be called.
Whenever I import
toast
from"react-hot-toast/headless"
and calltoast('some message here')
, I don't see a toast message.Here's my code:
Sample.tsx
where thetoast
function is used.Notifications.tsx
Toasty.tsx
This is what my
App.tsx
looks like where I added theNotifications
componentNote
If I manually add a toast in the
Notifications.tsx
, it does render visible. See example belowThe text was updated successfully, but these errors were encountered: