DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 967,911 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Ana MarΓ­a DΓ­az
Ana MarΓ­a DΓ­az

Posted on

React + Redux the perfect combo

During this week I started to learn more about how React js works at low level, including how it manage the state. Redux is a state management library that will help us to store and manage all the application states.
It also provides some APIs using which we can make changes to the existing state as weel as fetch the current state of the application.

How does Redux works?

There’s something called Redux store this is the main central bucket which stores all the states of an application. The store has to be provided to the App.js wrapping it with a provider tag, with this all its children can access the state of the application from store allowing it to act as a global state.

Actions inside Redux must have at least a type associated with it and extra details is optional depending on the type of action.

Reducers inside Redux are uses to specify how the state three is transformed by actions, taking 2 things: Previous State and an action. Then they reduce it to one entity known as the new updated instance of state.

Understanding Redux is complex, on the next weeks I’ll be completely focused on learning more about this library.

Oldest comments (0)

In defense of the modern web

I expect I'll annoy everyone with this post: the anti-JavaScript crusaders, justly aghast at how much of the stuff we slather onto modern websites; the people arguing the web is a broken platform for interactive applications anyway and we should start over;

React users; the old guard with their artisanal JS and hand authored HTML; and Tom MacWright, someone I've admired from afar since I first became aware of his work on Mapbox many years ago. But I guess that's the price of having opinions.