DEV Community

Discussion on: How YOU can use the Context API in React.js to pubsub

Collapse
 
softchris profile image
Chris Noring

depends on what you want from your pubsub of course. If you want something use a React API I would say this is the one. If you want a straight up pubsub you can use anywhere I would look at a more generic approach like here, dev.to/angular/ngrx-from-the-begin...

Tbh I think the Context API looks a bit clunky with its Providers and Consumers components, but it's a supported way of doing it so I 'm thinking - should I use the supported way or come up with something myself