Starter Code

The Starter Code

Solution Code

The Solution Code

Objectives

Step 1:

Talk about imports and exports.

Explain that we will be creating seperate components today for the project. We will take the counter component and the color picker from the break out yesterday and combine them into one application. We will need to export each component and import them in to the main index.js file.

https://www.geeksforgeeks.org/reactjs-importing-exporting/

Title.jsx component

import React from "react";
const Title = (props) => <h2 className="title">Name</h2>;

export default Title;

PridePoints.jsx

import React from "react";

const PridePoints = (props) => {
  return (
    <div className="point-container">
      <button>✚</button>
      <p className="points">1 Pride Level</p>
    </div>
  );
};

export default PridePoints;