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

https://github.com/willklein/hooks-exercise


https://github.com/willklein/hooks-exercise

Last synced: about 1 year ago
JSON representation

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.