I just learned about it too. but what are the cases where you would choose this over something like redux.
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.
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.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I just learned about it too. but what are the cases where you would choose this over something like redux.
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.
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.