DEV Community

Discussion on: React's new Context API and Actions

Collapse
 
washingtonsteven profile image
Steven Washington

React has always had state management built-in. This is just another way of updating the front-end state; no assumptions are made about any back-end architecture.

In theory, instead of your action directly modifying the context state, the action could kick off a request to your backend to update its data, which then responds with updated (and server-validated) data that you can use to update your front-end store.

In that sense, React is still just a view layer, showing the data that you pass into its state and responding to user events. It's up to you to decide what sort of data updates that triggers, and React will come along for the ride. 😀