DEV Community

Discussion on: How to Use New React Context API Detailed

Collapse
 
jay97 profile image
Jamal Al

I just learned about it too. but what are the cases where you would choose this over something like redux.

Collapse
 
sait profile image
Sai gowtham

Redux is a seperate Library used to manage the state in react. React context is used in particular use cases like login and logout or using different themes in your app.

Collapse
 
ghanshyamkdobariya profile image
Ghanshyam

Before you jump to react context - know what it prop drilling problem from kent c dodds
blog.kentcdodds.com/prop-drilling-...

you can choose context approach when your screens in SPA are less and you have small amount of data to handle in entire app.