Nothing Special   »   [go: up one dir, main page]

DEV Community

Jayant Khandelwal
Jayant Khandelwal

Posted on

Fetch using useReducer!

In this post, we will gonna see how to make a Fetch request with the help of the useReducer hook.

This is our reducer function,

Alt Text

Let's have a look at our functional component,

Alt Text

Complete Code:

Alt Text

I hope it might help you!

Happy coding!

-Jayant khandelwal

Top comments (0)