JetechNY / react-hooks-class-setstate-lab

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Class Component State and Events Lab

Objectives

  • Practice refactoring function components to class components

Instructions

In this lab is the working code from a previous lab, using function components. If you run the tests now, they should all pass, except for the tests checking that you are using class components instead of functions. Your goal is to refactor all the components in the src/components directory to use classes instead of functions, and still have the tests passing.

Start by familiarizing yourself with the code and the functionality, then work through each component and convert them to class components.

Make sure to pay attention to syntax (and in particular, this and arrow functions). Also make sure you are initializing and setting state correctly.

Resources

About

License:Other


Languages

Language:JavaScript 63.6%Language:CSS 18.9%Language:HTML 17.5%