Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Exercise-1

In this exercise, you'll practice creating a simple react component. In your main.jsx file, you'll want to do the following:

  • Create a React component called MyComponent
  • In the render function, create two variables name and interest: set them to your name, and one of your interests
  • Then, your render function should return a <div> with two <p> elements in side of it. The first <p> should say "Hello, my name is NAME", and the second should say "I am interested in INTEREST". Make sure to reference your JavaScript variables
  • After you've created your component, you should use ReactDOM to render your component in the main element on your page