I
I
Iliaity2018-11-22 14:19:50
React
Iliaity, 2018-11-22 14:19:50

Context API can be used with Redux?

Good afternoon.
If the project uses redux , is it advisable to use the Context API ?
I understand that these are completely different things.
Redux is the state of the application, and the Context API is useful for props forwarding if the components are at different levels of nesting.
For example, I have a button in the header - Login and Register. And by clicking on one of these buttons, a modal with a form should pop up. In this case, it will be convenient for me to use the Context API (I know that you can call the form through the route)? Just forward props openModalRegistration. If this case is not correct, can you give examples when it is more expedient to use the Context API than to shove information into Redux?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Spirin, 2018-11-22
@Iliaity

Context API can be used with Redux?

It is possible and necessary.
Global modals are better with Redux.
Themes, locales, UA are all more convenient to use with the Context API

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question