Core principles of Redux
Single source of truth: The state of your whole application is stored in an object tree within a single store. Ideally, there should be a single Redux store that can guide your views to render the whole application. This means you should keep all of your states away from class components and place them directly in the Redux store. This will simplify the method with which we will restore the view in tests or when we do a time travel.
Having a single place to store things feels unnatural to some developers, most likely because, over the years on the backend, we have learned that it leads to monolithic architecture. This is not, however, the case in an application environment. An application window is not expected to ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access