+ 2

Discussion: Redux vs Context API

When we decide to use Redux or Context API? The general answer that I find is redux for large projects and context API for small projects

4th Mar 2019, 6:24 PM
Ameer Abdulaziz
Ameer Abdulaziz - avatar
5 Réponses
+ 5
https://stackoverflow.com/questions/49568073/react-context-vs-react-redux-when-should-i-use-each-one
6th Mar 2019, 2:37 AM
abdulconsole
abdulconsole - avatar
+ 5
Use redux whenever the app sharing states among the components. Below is an example of redux which sharing state between 2 elements. https://code.sololearn.com/W5E46XL5PvM2/?ref=app
12th Mar 2019, 9:46 AM
Calviղ
Calviղ - avatar
+ 4
Context api is great for passing down data to deeply nested components, whereas redux can handle not only nested components, it handles state globally.
12th Mar 2019, 9:54 AM
Calviղ
Calviղ - avatar
+ 1
Yeah but I believe context API does the same thing
12th Mar 2019, 9:48 AM
Ameer Abdulaziz
Ameer Abdulaziz - avatar