willklein / hooks-exercise

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

About


Languages

Language:JavaScript 50.2%Language:HTML 32.5%Language:CSS 17.3%