Summary
In this chapter, we learned how to create a module state and integrate it in React. Using what we learned, you can use the module state as a global state in React. Subscription plays an important role in integration because it allows the re-rendering of components to be triggered when the module state is changed. In addition to the basic Subscription implementation to use the module state in React, there is an official package. Both the basic Subscription and the official package work for the production use case.
In the next chapter, we will learn about the third pattern of implementing a global state, which is a combination of the first pattern and the second pattern.