Should I make all API calls with redux, or should I keep them simply in components?

Viewed 944

I am new at using react/redux. I just started working on a react project, but I don't really know which one do I choose when when it comes to making API calls. Should I do all of API calls with redux or are there cases in which I can handle them using components?

2 Answers

Choosing either one has its own merit. If you want the data from API in global state or for any further use you may need to choose to do your calls in redux. If the interaction is very less and data is not used any further you can opt to do calls in component

Related