joethemow
joethemow

Reputation: 1773

Should I use an action creator?

I am making api calls to my server and not sure if whether to do it in my component or action creator. The action creator is meant to update application state, but this api call will NOT add anything to the redux state. Do I still use an action creator even if I am not changing the application state?

Upvotes: 0

Views: 66

Answers (1)

Chris Dąbrowski
Chris Dąbrowski

Reputation: 1992

No. This is independent from Redux.

Just make a call in a regular component or even in a helper/service class.

Actions in redux are only for updating the store.

Upvotes: 3

Related Questions