In this article I will walk you through a generic setup of Redux for a Rest api using React Hooks.

For that, we will create multiple hooks in order to structure our project properly and improve readability. Our main hook, useRest will be using other generic hooks which are designed in the best way possible to serve our needs, useRestDispatcher, useExecutor and useRequestAgent.

Instead of adding boilerplate code for each api request and storing the data in redux, you will be able to do that with a few lines of code. …

Ilcho Taleski

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store