Reputation: 497
Since React is regarded as View of MVC,
would Sagas considered as Controller and the Stores as Model?
Is React + Redux + Redux Saga MVC? I've read somewhere that they are different since Redux stricts the data flow to only one way.
Would React be considered as View? Saga as Controller? Redux as Model?
Edit: I'd like to clarify I would like to know if these consider as MVC and why/why not. Not which.
Upvotes: 3
Views: 787
Reputation: 5473
This is opinionated answer on how I have been using React/Redux/Sagas
Would React be considered as View? Saga as Controller? Redux as Model?
IMO you can consider
I have been using Saga to listen on action and perform side effects like calling API and once API data returns, sometimes I have been using Saga to process API response data
and modify it as needed or perform another side effect and then emit new action
with modified payload which will be consumed by Redux reducer
to modify state
. Most of the times how to manipulate data logic exits in Redux reducer.
Upvotes: 3