Please is advisable to still redux even if you know the context API?
For further actions, you may consider blocking this person and/or reporting abuse
Please is advisable to still redux even if you know the context API?
For further actions, you may consider blocking this person and/or reporting abuse
Nik L. -
Sebastien Lorber -
Rajesh Dhiman -
Vinod Chandra -
Top comments (3)
If it was a project starting from scratch, I would not use it since with React and Hooks you have a quite similar functionality right out of the box.
Here is a nice video for reference.
okay Thank you
Depends on what you're doing. If you're going on an existing project, it's pretty much guaranteed to have Redux. Context API is good for fairly small apps with few asynchronous actions and dependencies. You also have to keep track of your state structure in both cases.
If you're starting something new and potentially big, you may want to learn about Effector, which gives you both a hooks-based state API and an event bus to tie together different states, as well as subscriptions to asynchronous events ('effects'). As a warning, it's currently not fully documented, so you have to jump between the docs and the GitHub readme to use it effectively.