Skip to content

KelvinJin/react-create-element-lab-cb-gh-000

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React createElement() Lab

Overview

In this lab, you'll build a simple view using createElement().

Representing

Internet.

Before we start, don't forget to add the React and ReactDOM libraries to your index.html:

<script src="node_modules/react/dist/react.js"></script>
<script src="node_modules/react-dom/dist/react-dom.js"></script>

This should be after any page content, and before your own index.js script.

Your task is to create a React element that represents you (or a close approximation, hopefully)! In the index.js file create a variable called meInReact. This variable should be a React element, and should have the following structure:

<div class="me">
  <h1>An Awesome Person</h1>
  <p>Who is learning React</p>
  
  <ul class="me__interests">
    <li>JavaScript</li>
    <li>React</li>
    <li>Movies</li>
    <li>Ice cream</li>
  </ul>
</div>

Feel free to render out the component in the DOM using ReactDOM.render().

Resources

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 69.2%
  • HTML 21.5%
  • Shell 9.3%