As you start building bigger apps in React, you soon realize that the complexity of your app is not because of the framework, rather it’s in the use of data. Managing Data, aka Client-side state can get pretty tricky, especially with cross-cutting features that all manipulate the same subset of data. Throw in a few other wrinkles like tracking async operations, showing feedback for failed operations, validations on forms, enabling/disabling UI, etc. and you have a case of “Houston, we have a problem”!
In this talk, we will explore the current trends in managing client-side state in React. This includes
- Distinguishing between app-state vs component-state
- Using Container + Presentation components
- Redux for establishing uni-directional data flows
- Using Redux middleware (thunks, sagas, batches, network) for simplifying async operations
- Using MobX as an alternative (think declarative Redux)
- Encapsulating service-components as a Higher-Order component
By the end of this talk, you will walk away with a variety of ideas to apply to your own apps. Taming the complexity, inherent in client-state should not be intimidating any more.