Content

What is React.js?
Folder Structure

Folders - public, src

Files - index.js, index.html, package.json, manifest.json, .gitignore

React Components and Lifecycle Methods

1. Class Based and Functional Components

2. JSX (JavaScript XML) - allows us to write HTML in React

3. State and Props

4. Lifecycle methods in Class based components

5. React Hooks - useState and useEffect

Using CSS in React.js

1. External CSS files

2. Inline CSS in JSX

3. CSS Modules (To limit the styles for particular component)

DOM Events

1. Button onClick - Go to Counter App

2. Input onChange - Go to Search Filtering App

Routing in React.js

1. react-router-dom library.

2. Use Link tag from library instead of HTML anchor tag for internal routing.

API Calls

Making fetch or axios Requests

Go to Random Joke App

Virtual DOM

1. DOM Manipulation - Vanilla JS working

js dom example

2. DOM Manipulation - The React.js way

React dom manipulation


Refer below article to understand more about Virtual DOM :

https://bitsofco.de/understanding-the-virtual-dom/
Building and Deploying the React project

1. npm run build - to generate the final build of the project.

2. Deploying it on Netlify - https://www.netlify.com/

Client Side Rendering and Its issue

1. Instead of getting all the content from HTML doc itself, a bare-bones HTML document with a JavaScript file in initial loading itself is received

2. So JavaScript is rendering the markup (HTML) to Browser.


Issue : It's not so good for SEO

Frameworks/Libraries based on React.js to solve some issues

1. Gatsby.js - Static Site Generation

2. Next.js - Server Side Rendering