Answer the question
In order to leave comments, you need to log in
Import vs redux and react context?
Good day, such a question, why use React context or redux for simple data transfer between components if it is possible to import all data as an object through import? React context or redux work faster? Thanks
Answer the question
In order to leave comments, you need to log in
context - to reduce cohesion. import binds the component with the file where the data is located and you can’t change it in any way. For example, this greatly interferes with tests.
redux is not at all about the fact that access to data and the import of some object cannot be replaced.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question