Web System- React
Web System- React
Services
INTRODUCTION TO REACT
BITS College
Addis Ababa, Ethiopia, 2025
Lecturer Name:
6/13/2025 1
What is React?
• React is a JavaScript framework
• Used for front end web development
• Think of jQuery, but more structured
• Created and used by Facebook
• Famous for implementing a virtual dom
Timeline of front-end JavaScript frameworks
3. Components everywhere
JavaScript and HTML in the same file
Traditional React
approach approach
JSX: the React programming language
let a = 4;
a = 2; // Mutates `a`
const b = [];
function hasSideEffects() {
b = [0];
}
Components
Components are functions for user interfaces
The function
export default function MyComponent(props) { outputs HTML
return <div>Hello, world! My name is {props.name}</div>;
}
First step:
mockup / wireframe
TodoList
Todo
Creating a new React app
Creating a new React app is simple!
1. Install Node.js
2. Run: npx create-react-app app-name
3. New app created in folder: ./app-name
Anatomy of a new React app
App is a boilerplate
starter component
index.js binds
React to the DOM
package.json configures
npm dependencies
Component Hierarchy
Title
TodoForm
App
Syntax:
– or –
2. A useState setter is called
Second React hook: useEffect
Purpose:
Act as an observer, running code in response to value changes
Syntax:
useEffect(() => {
console.log(`myValue was changed! New value: ${myValue}`);
}, [myValue]);
• Redux
• Material-UI
• Bootstrap
• Font-Awesome
• SWR
Thank You !!!
6/13/2025 28