-1

I am learning about Redux, but one question that is confusing me that is why I have to use Redux instead of useContext and useReducer? That's why I am curious about the differences between useContext, useReducer, and Redux?

Amila Senadheera
  • 12,229
  • 15
  • 27
  • 43
msadikjowel
  • 49
  • 1
  • 1
  • 5

1 Answers1

1

They are not mutually exclusive, and the general answer might be that it depends on the project you are working on.

useContext & useReducer are part of React and are not so much opinionated on how you should use them in your implementations.

Redux is an extra dependency and is very opinionated about how to do things - that might be good if your app has lots of data and you need some structure to keep track of its flow. *

Also reference:

DᴀʀᴛʜVᴀᴅᴇʀ
  • 7,681
  • 17
  • 73
  • 127