It is global by default. It becomes shared only if the developer wants it to be. Limiting the global state by Context was a highly requested feature necessary for concurrent server-side rendering. If I’m rendering the same application twice at the same time for two different users, I don’t want their state to be shared. I can handle this by wrapping each application in an instance of the ReactN Context.

One of the benefits of ReactN’s implementation over a purely Context implementation is that it does not use the contextType for class Components, which are restricted to a single Context subscription. The user is able to use a ReactN global Component while simultaneously subscribing to any other Context that they want.

A second benefit of ReactN’s implementation is that a Context is not necessary. It is optional. Not providing a Context does not throw an error or crash the application. It falls back to a global state. Context is offered as a convenience, but developers are ultimately the decision-makers on how they want to implement ReactN in their application.

Senior front end engineer /

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store