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
- Host: GitHub
- URL: https://github.com/sabinadams/hooks-state-playground
- Owner: sabinadams
- Created: 2019-09-21T08:39:16.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T14:26:43.000Z (over 2 years ago)
- Last Synced: 2025-10-19T21:49:15.250Z (8 months ago)
- Topics: hooks-api-react, react, react-context-api, react-state-management
- Language: JavaScript
- Size: 4.16 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
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.