Professional Documents
Culture Documents
CSC 3326 04 Lab
CSC 3326 04 Lab
Lab 4
Introduction to React
Front End development
School of Science and Engineering Computer Science Department
I. Introduction:
React, is an open-source JavaScript library used for building user interfaces (UIs) and front-
end web applications. React is known for its component-based architecture, which allows
developers to create reusable UI components. These components are like building blocks that
can be combined to build complex user interfaces. This modular approach makes it easier to
manage and scale large web applications.
On VScode, open the client folder which we created last time and open the App.js file.This is the
file that contains our main application:
function App(props) {
return (
<div className="container">
<h1>Students lists</h1>
<ul role="list">
<Student />
<Student/>
<Student/>
</ul>
</div>
);
}
</div>
</li>
);
}
Run the front end through the command npm start. You should have the following
screen:
And edit the Student.js so that the default name is replaced by the content of
{props.name}:
export default function Student(props) {
School of Science and Engineering Computer Science Department
return (
<li className="student">
<div className="info">
Full Name: <h1> {props.name}</h1>
<li>Email: mohammed@aui.la</li>
<li>Id: Computer Science</li>
<li>Major: Computer Science</li>
</div>
</li>
);
}
ASSIGNMENT: Edit the remaining attributes of students so that they are passed as props. Submit the
code for the App.js and Student.js component