A
A
artem-krisanov2021-07-12 09:54:32
React
artem-krisanov, 2021-07-12 09:54:32

Need to use Redux in Dialogs?

There is a site - a marketplace. This site contains various dialog boxes. Including such as - a list of user orders and detailed information about one specific order. The data for both dialog boxes comes from the server. This data is not used anywhere else, except in these windows. So the question is, does it make sense to use Redux to store this data, or should React's local state be used? Which option would be the best and why? Thank you in advance for your response!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Artyomov, 2021-07-12
@ArtyomovAnton

Redux only makes sense to use when data changes affect rendering in multiple components at the same time. In fact, Redux stores only the information that is needed throughout the application, and not in a specific component. If product data is displayed only in these modals, store it in state.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question