1. What is the virtual DOM?
2. What is a component?
3. What is JSX?
Answer the following questions using the index.html
and app.js
files in this repo.
-
Pull in React, ReactDOM, and Babel from a CDN.
-
Without using JSX, create and render a React element. This element should render the words
Hello, World
as anh1
HTML element. It should have a class of"header"
. -
Create a component
Header
that takes a prop,title
an renders it ash1
element. -
Create a
NavBar
component. It should display an unordered list of page links. These links should be generated from an array of objects. The objects should have the page title as a key and the page hyperlink as the value.const pageData = [{"About": "/about"}, {"Our Team": "/team"}, {"Pricing": "/pricing"}]; <NavBar pages={pageData} /`>