Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Famchankou_statemanagement_for_lazy

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.
Avatar for Maksim Maksim
April 29, 2019

 Famchankou_statemanagement_for_lazy

Avatar for Maksim

Maksim

April 29, 2019

More Decks by Maksim

Other Decks in Technology

Transcript

  1. 2 • 5 years of experience in Software Development •

    More than 2.5 years in EPAM • Work with in ECMAScript, NodeJS, React, Angular, etc. Aliaksandr Famchankou
  2. 3 Agenda - Evolution of state management - Design patterns

    behind state management - Flux approach - Redux approach - Middlewares in Redux - Thunk/Saga - MobX brief introduction
  3. 10 Main principles - Single Responsibility of State Management -

    Immutability - Pure Function - Composability - Reactivity
  4. 13

  5. 15 Key concepts • Actions - Helper methods that facilitate

    passing data to the Dispatcher • Dispatcher - Receives actions and broadcasts payloads to registered callbacks • Stores - Containers for application state & logic that have callbacks registered to the dispatcher • Controller Views - React Components that grab the state from Stores and pass it down via props to child components
  6. 18 Clear component design Components are only responsible for the

    UI - Render UI - Dispatch Actions - React to State changes - Reads and Writes separated
  7. 39 Summary - Predictability - Maintainability - Declarative effects -

    Mechanism to handle async and nonparallel operations - Clear design patterns