> but you do need to figure out how to store global state that can be accessed anywhere in your application.
Immediately I disagree and feel antagonistic towards this article.
Then the author provides an example of "prop drilling". Sounds an awful lot like Inversion of Control [1]. I've been down this road before. Next comes a Services pattern [2] (the world re-invents COM once again) and then comes Dependency Injection [3]. What he calls "global state" others have called "cross-cutting concerns" [4]. Pretty soon we'll be all aspect-oriented-programming [5] up in here.
> What you need to do is store your theme setting in a Redux or MobX store, or in a plain JavaScript object, and pass it to all your components using Context.
Yup. The beginning of a services pattern by changing to inversion of control. Once you realize you don't want all of your state on a single object you'll have `context.getUser` and `context.getTheme` and then you'll think having specific functions is a pain so you'll have `context.get(ContextType.User)`. Then you'll have interfaces so you can easily unit test with mock services.
This is all good stuff. Keep going down that road.
1. https://en.wikipedia.org/wiki/Inversion_of_control
2. https://en.wikipedia.org/wiki/Service_layer_pattern
3. https://en.wikipedia.org/wiki/Dependency_injection
4. https://en.wikipedia.org/wiki/Cross-cutting_concern
5. https://en.wikipedia.org/wiki/Aspect-oriented_software_devel...