O GoConqr está de visual novo! Conte para nós o que você achou.

Módulo 2 de 3 · Texto

Redux - The principles of Redux

Tomas Katz

The principles of Redux

  • Single source of truth – all of the different states of different services and components are saved into the store, an object that holds the complete state.
    • Universal apps - This makes it possible to serialize state on server side and pass it to the client with no extra effort, thus making it easy to create universal apps.
    • Easier to debug  - or inspect the application
    • Enables persistence of app state in development – makes for faster development cycles
    • Some functionality becomes trivial to implement -  for example Undo/Redo
  • State is read-only
    • The only way to change state is by emitting actions, an object describing what happened.
    • Since state mutation is centralized, and changes happen one by one in a strict order, there is no subtle race conditions (which change happened first? and which changes are dependent on that change?).
    • Since actions are plain objects they can be logged, stored, serialized for debugging and research.
  • Changes are made with pure functions
    • reducers are just pure functions that take the previous state and an action, and return the next state.

Instruções

Para avançar no curso, envie uma tentativa deste quiz. Você pode enviá-la depois da última pergunta.

Ir para o módulo escolhido

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?