An open API service indexing awesome lists of open source software.

https://github.com/sabinadams/hooks-state-playground

Using React Hooks to manage State in Function Components
https://github.com/sabinadams/hooks-state-playground

hooks-api-react react react-context-api react-state-management

Last synced: 4 months ago
JSON representation

Using React Hooks to manage State in Function Components

Awesome Lists containing this project

README

          

## Project's Purpose

Explained in my [article on managing state with react hooks](https://sabinthedev.com/managing-state-with-react-hooks/)

Showcases statefulness in function components in 3 ways:
1. Using `useState`
2. Using `useReducer`
3. Global/Shared state using React's Context API and hooks

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Starting the Demo Application

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.

Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.

You will also see any lint errors in the console.