- [Instructor] Let's go ahead…and create our first react element.…Now, I'm in Chapter Two, the Start folder…inside of our React is Fun project…and I've opened the index.js file.…Now, I'm going to highlight everything here…and do something kind of bold.…I'm going to delete everything…and let's create this absolutely from scratch.…Now the first thing that we'll do…is we'll import React from 'react'.…This is pretty important.…We need to import the React Library in order to use it.…
The second that we'll import is ReactDOM…and this is going to provide us with a render method…that we can use to render our react component,…our react element to the DOM.…So we'll say import ReactDom from 'react-dom'.…Now, the next thing I want to do…is create my React Element.…So we'll call it title and we'll use React.createElement…and this is going to take in three different arguments.…The first is the type of element…we want to create and that's an h1.…
The second is any attributes that we want to provide…so we'll say title and we'll give it…
- Refactoring elements with JSX
- Creating components
- Adding component properties and methods
- Displaying child components
- Working with props and state
- Conditional rendering
Skill Level Intermediate
1. What Is React?
2. Introduction to React Elements
3. React Components
4. Props and State
5. Additional Library Features
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.