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
Hi, I was able to receive notifications with Firebase Messaging using npx expo run:ios and simulator. However, mostly during development we're using Expo Go.
So what I did, I added an env to check if we're going to add the Notification component.
Is there a better/cleaner way as how I've implemented it? Thank you for any feedback.
constNotification=React.lazy(async()=>{if(Constants.expoConfig?.extra?.hasNotification){constmodule=awaitimport('../Notification');return{default: module.Notification,};}return{default: ()=>null};// Consistently return a default export});constNotificationSubscription=()=>{const{guestId: employeeId}=useAuth();return(<AuthGuard><Suspensefallback={null}><NotificationuserId={employeeId}/></Suspense></AuthGuard>);};
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I was able to receive notifications with Firebase Messaging using
npx expo run:ios
and simulator. However, mostly during development we're using Expo Go.So what I did, I added an
env
to check if we're going to add theNotification
component.Is there a better/cleaner way as how I've implemented it? Thank you for any feedback.
Beta Was this translation helpful? Give feedback.
All reactions