I’ve got a
useSubscription call that I’d like to be global to my app.
If I add it in, to individual components in my app, it works great. But I haven’t figured out yet how to include it in my app just once and get it to work on every page.
For example, I’ve got a navbar component that’s always present on every page. If I put the call to
useSubscription in there, I can see the subscription get registered on my server. And I can see the pubsub work on my server and the subscription returns true. But the
onSubscriptionData block of my
useSubscription call on my client never activates.
Is there some sample code someplace of how to set up a
useSubscription call that is global to an app?