BEST PRACTISE: React + Pub/Sub + SubscriptionManager

Hi guys,

any of you using a SubscriptionManager with React? Like https://github.com/kadirahq/subs-manager

I’d love to have a combination of global subscriptions and template-level subscriptions.

What is the best-practise of doing so? Right now I can’t seem to make it work…

What kind of data do you want to have globally?
If it is for user related data (or any data in general) you can use React Context which you can then use across the app where it is needed, so it is then clear where the data is coming from.
I would also recommend using a different subs manager as stuff from Kadira has not been updated in a while. I’m personally using ccorcos version which has some additional functionality.

1 Like