Hemos decidido regresar a Redux al anillo de Probar para mostrar que ya no es considerada como la solución predeterminada para la gestión del estado en aplicaciones React. Nuestra experiencia muestra que Redux aún es un framework valioso en muchos casos aunque lleva a escribir un código más verboso y difícil de mantener, en comparación con otros enfoques. El añadir Redux Sagas a la mezcla generalmente contribuye a este problema. Como alternativa se pueden utilizar las características incorporadas en las versiones recientes de React para gestionar el estado sin necesidad de frameworks adicionales. No obstante, nos gustaría resaltar que una vez alcanzado el punto en el que la gestión del estado comienza a hacerse compleja, podría ser apropiado usar Redux o tal vez incluso Recoil, publicada recientemente por Facebook.
With the increasing complexity of single-page JavaScript applications, we have seen a more pressing need to make client-side state management predictable. Redux, with its three principles of restrictions for updating state, has proven to be invaluable in a number of projects we have implemented. Getting Started with Redux and idiomatic Redux tutorials are a good starting point for new and experienced users. Its minimal library design has spawned a rich set of tools, and we encourage you to check out the redux-ecosystem-links project for examples, middleware and utility libraries. We also particularly like the testability story: Dispatching actions, state transitions and rendering can be unit-tested separately from one another and with minimal amounts of mocking.
With the increasing complexity of single-page JavaScript applications, we have seen a more pressing need to make client-side state management predictable. Redux, with its three principles of restrictions for updating state, has proven to be invaluable in a number of projects we have implemented. Getting Started with Redux and idiomatic Redux tutorials are a good starting point for new and experienced users. Its minimal library design has spawned a rich set of tools, and we encourage you to check out the redux-ecosystem-links project for examples, middleware and utility libraries. We also particularly like the testability story: Dispatching actions, state transitions and rendering can be unit-tested separately from one another and with minimal amounts of mocking.
Redux is a great, mature tool that has helped many of our teams reframe how they think about managing state in client-side apps. Using a Flux-style approach, it enables a loosely coupled state-machine architecture that's easy to reason about. We've found it a good companion to some of our favored JavaScript frameworks, such as Ember and React.