Welcome back to the React Universe! This exercise lets you build a React component containing more than one HTML tag.
Have a look at the App.js file: the default export function called App
returns a <div>
which wants to be replaced. Let us comply with its request!
Render an HTML article
tag containing a heading and a paragraph to the browser. To do so, create a component called HelloWorldArticle
.
Use the following hints as guideline:
- In the App.js, create a new function called
HelloWorldArticle()
. HelloWorldArticle()
should return an HTMLarticle
tag as a wrapper which contains;- an
h1
heading - at least one
p
tag - Note: Add whatever tags you like, but the predefined styles are limited ;)
- an
- In the return statement of your
App
function, replace thediv
with yourHelloWorldArticle
component. - Once again, look at the browser and be amazed!
- You only have to touch the App.js file.
To work locally, please install the dependencies using npm i
first.
Run npm run start
to start a development server and open the displayed URL in a browser.
Select the "Preview: 3000" tab to view this project.
The
npm run start
script runs automatically.
You can use the following commands:
npm run start
to start a development server