/react_reducer_example

This example shows how to use reducer to handle states and actions. This code uses a fake data API called https://jsonplaceholder.typicode.com for GET, POST and DELETE data

Primary LanguageJavaScript

This project was created for studying porpuses.

Launch here to test:

https://romualdo-ah.github.io/react_reducer_example

File DataFetching.js was created and used a reducer function and a component named DataFetching.js. This component uses an external API to make POST, GET, and DELETE requests.

The API used

https://jsonplaceholder.typicode.com

The goal

The goal of this project is to show an alternative to clean up the DataFetching component by separating the state handling on a external function (reducer), and share some global states between other components.

Deployed with 🐙😼Github pages This project was bootstrapped with Create React App.