shubhamr238
shubhamr238

Reputation: 1408

Is it necessary to create reducer for every action?

I'm new to React and Redux, I'm currently struggling with the concept when to create an action and when the action should call the reducer.

Let's say i want to do a post req to send my data to backend, i created an action and called axios in it, and then despatched the action. Do I need a Reducer Here..?

Any help is welcomed.

Upvotes: 0

Views: 368

Answers (1)

José
José

Reputation: 32

We create an action when we need to modify our state for example, get user information, modify, delete value, and for our state to be updated we need to use our reducer.

Upvotes: 1

Related Questions