Exercise

In this exercise, you have to create and render the Title component of the app.

s_9d770ebd1641d231a06d1d808f243a8b1d9c4424b7c00b112f83df7ba3151d4b_1496154046364_screen shot 2017-05-30 at 10 20 16 am

Create the component

Create a new file named Title.js and create a simple component that is just a function that returns a React element.

Note that you have to import React as <h1> will be transformed into React.createElement('h1')

Render your Title component

In your App.js, you can use your Title component by importing it and simply adding the JSX call in your render function:

See solution

Last updated