DEV Community


Posted on

DRAGnet Reducer

Rails + React + Redux - Pt 11

The queens_reducer.js was the first reducer I wrote for DRAGnet. It was a natural choice as the simplest.

Let's get started!

For UPDATE_QUEEN I defined idx as the id for the queen being updated by the user. In the case of UPDATE_QUEEN, the return is the data for the updated queen spliced from the complete array of drag_queens.

That's all folks!

Top comments (0)