React – AJAX, SPA Components and Props
Web Technology
Subin Sahayam, Rourab Paul Assistant Professor,
Department of Computer Science and Engineering
Shiv Nadar University
K1
AJAX
DOM manipulation → changes part of the page on the client side.
AJAX → gets new data from the server without reloading the page.
K2
AJAX
Front End Timeline
K2
Front End Timeline
K2
K1
Single Page Application (SPA)
K2
Single Page Application (SPA)
Traditional vs React
K2
Front End Development Tasks
K2
K1
Running React
K3
Running React
K3
Running React
For linux
sudo apt update
sudo apt install nodejs npm
K3
Running React
K3
Running React
K3
Running React
node -v
npm -v
Term | Simple Meaning |
Node.js | Runs JavaScript outside the browser (usually on the server). |
npm | Downloads and manages JavaScript libraries/packages. |
K3
Running React
K3
Running React
K3
Running React
npm install
npm run dev
K3
Running React
K3
Running React
K3
Running React
K3
Running React
K3
Running React
K3
Running React
K3
Running React
K3
Running React
K3
Running React
K3
Running React
React Component – Todo list
K2
React Component Hierarchy – Todo list
K2
function App() {
return (
<TodoList />
);
}
function TodoList() {
return (
<>
<TodoForm />
<TodoItem />
<TodoItem />
</>
);
}
React Props
K1
React Props
K1
React Props
K3
React Props
K3
React Props
K3
React Props
K3
React Props
K3
React Props
K3
react_search_filter_app/
├── package.json
├── vite.config.js
├── index.html
└── src/
├── main.jsx
├── App.jsx
├── App.css
└── index.css
React Props
K3
react_props_app/
├── package.json
├── vite.config.js
├── index.html
└── src/
├── main.jsx
├── App.jsx
├── App.css
└── index.css
package.json
Defines the project.
Lists required libraries.
Defines commands such as npm run dev.
React Props
K3
react_props_app/
├── package.json
├── vite.config.js
├── index.html
└── src/
├── main.jsx
├── App.jsx
├── App.css
└── index.css
vite.config.js
Configures Vite.
Enables React support through the React plugin.
React Props
K3
react_props_app/
├── package.json
├── vite.config.js
├── index.html
└── src/
├── main.jsx
├── App.jsx
├── App.css
└── index.css
index.html
The only HTML page loaded by the browser.
Contains the root <div> where React is attached.
React Props
K3
react_props_app/
├── package.json
├── vite.config.js
├── index.html
└── src/
├── main.jsx
├── App.jsx
├── App.css
└── index.css
src/main.jsx
Entry point of the React application.
Connects React with index.html.
Renders the App component.
React Props
K3
react_props_app/
├── package.json
├── vite.config.js
├── index.html
└── src/
├── main.jsx
├── App.jsx
├── App.css
└── index.css
src/app.jsx
all the functions
React Props
K3
react_props_app/
├── package.json
├── vite.config.js
├── index.html
└── src/
├── main.jsx
├── App.jsx
├── App.css
└── index.css
src/App.css
Provides component-level styling for the search and product table UI.
src/index.css
Provides global styles applied to the entire React application.
References
THANK YOU