Skip to content

This app is intended to be a simple showcase of React Hooks. Each file in examples/ is a self-contained example of a hook.

Notifications You must be signed in to change notification settings

papercircuit/increment-counter-using-react-hooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Hook Examples

This app is intended to be a simple showcase of React Hooks using an intentionally simple . Each file in /examples is a self-contained hook incrementing a counter. These are not intended to show the best use case for each hook, but rather to show how each hook works.

Installation

Run npm install

Running the app

Run npm start and open http://localhost:3000 in your browser.

Adding a new example

To add a new example, simply create a new file in examples/ and add it to the list of examples in App.js. The file should export a function that returns a React component. The component should be a function component that uses a hook. The component should also have a displayName property that is the name of the hook.

Contributing

If you have an idea for a new example, feel free to open an issue or a pull request. If you have any questions, feel free to open a pull request with a question in the README.md file.

License

Free to use in any way you want but please attribute me if you use it in a project!

About

This app is intended to be a simple showcase of React Hooks. Each file in examples/ is a self-contained example of a hook.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published