Answer the question
In order to leave comments, you need to log in
What options for state management are the most correct?
I would like to know from more experienced people what options are most correct for these tasks:
1.
There is an application on React + Redux, the essence is simple, there is a main one, which shows a list of books. All these books are stored in the editorial state when the application is loaded. Books have 3 buttons - read, in progress and favorite. (true/false) When you click on one of these buttons, a banal state update occurs, something like this:
case ActionType.UPDATE_BOOK_FLAGS:
return {
...state,
books: state.books.map((book) =>
book.id === action.bookId
? { ...book, flags: action.payload }
: book,
)
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question