Practice hooks by refactoring a class component into a function component, and write a custom hook!
- refactor the ref for
modalNode
to be created withcreateRef
rather than the with a callback ref
- refactor to use hooks and make
App
a function component - open a PR for review!
- write tests of any level to validate the modal functions
- open a PR for review!
Need more challenge?
- refactor the modal behavior into a custom hook called
useModal
This project was bootstrapped with Create React App.
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.