https://github.com/willklein/hooks-exercise
https://github.com/willklein/hooks-exercise
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/willklein/hooks-exercise
- Owner: willklein
- Created: 2021-05-07T18:58:17.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-08T13:53:23.000Z (about 5 years ago)
- Last Synced: 2025-02-16T14:01:20.390Z (over 1 year ago)
- Language: JavaScript
- Size: 26.4 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hooks Exercise
Practice hooks by refactoring a class component into a function component, and write a custom hook!
## Challenges
### Level 0: Refs
- [ ] refactor the ref for `modalNode` to be created with `createRef` rather than the with a callback ref
### Level 1: Hooks
- [ ] refactor to use hooks and make `App` a function component
- [ ] open a PR for review!
### Level 2: Testing
- [ ] write tests of any level to validate the modal functions
- [ ] open a PR for review!
Need more challenge?
### Secret Level: Custom Hooks
- [ ] refactor the modal behavior into a custom hook called `useModal`
## Getting Started
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
### `yarn start`
Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.