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
renderfunction, create two variablesnameandinterest: set them to your name, and one of your interests - Then, your
renderfunction 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
ReactDOMto render your component in themainelement on your page