We use yarn redwood generate page
(yarn rw
for short) in this lesson to generate an IndexPage
component.
The first argument to yarn rw generate page
is the name of the page you are generating. The second argument is the path you want the page to show up on. So yarn rw generate page index /
will generate an IndexPage
component and insert a route entry in our web/src/Routes.js
file.
We learn that redwood import React
for you so you don't have to import it manually when you are creating a component.