Components are the heart of React, allowing us to split our UI into smaller, reusable pieces. Keeping focused components makes separation of concerns easier than ever. Before the introduction of Hooks in React 16.8, the only way to use state in a component was to make it a Class Component.
In order to create a class component, we first need to import React into the file: import React from ‘react’; . From there we need to name our class and give it access to React Component’s functions.


class OurCounter extends React.Component

We define a render() function inside of the class…


school busses

I recently started working as a Technical Coach for Flatiron. One of the most useful skills I am learning is how to explain concepts through real world applications. The other day I was helping a student work through the React portion of the curriculum asked me how we know when to use props. Initially, I was explaining the concept with technical terms, but it was very textbook and it still wasn’t clicking for the student. …

Arynn Boniface

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store