S
S
Sergey2020-08-18 19:33:16
React
Sergey, 2020-08-18 19:33:16

How to isolate state from React using hooks?

Hello.
Recently, I have been studying Redux, and when using it in conjunction with React, it seemed to me very convenient to isolate the state from it, that is, React does only its job, it is engaged in drawing the UI.

When studying hooks, the question arose of how to do it now? Google on this topic gets very superficial, in the end I get confused. Somewhere they use the useReduce + Contect API, somewhere redax hooks such as useSelector, useDispatch.
I would like to know which option is better.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question