baresi687 / lesson-task-js-frameworks-module1-homework-1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JS Frameworks - Module 1 - Homework - 1

Lesson Task 1 Question

Create a new app using Create React App.

You can create an app inside the current folder using:

npx create-react-app .

Create two components, ProfileName and DefaultProfilePic.

ProfileName should receive one prop called name and return it inside an <h4> element.

DefaultProfilePic should import an image and return it using an <img> element. The component should also receive and use one prop, altText.

Place both these components in an appropriate folder.

Import and render both components in src/App.js, passing appropriate prop values in.

Styling is not important but you can place any styles in src/App.css, making sure you have that imported in src/App.js.

Example:

About


Languages

Language:JavaScript 49.3%Language:HTML 41.7%Language:CSS 9.0%