React JS has become one of the most popular front-end JavaScript libraries for building interactive user interfaces. With React, you can create dynamic and responsive web applications that are easy to maintain and scale. In this tutorial, we will cover the full course of React JS along with 6+ projects and approximately 15 hours of content.
Before we begin, ensure that you have Node.js and npm installed on your system as React applications require them to run.
- Introduction to React JS
React JS is a declarative, efficient, and flexible JavaScript library for building user interfaces. It was developed by Facebook and is maintained by a community of developers. React works by creating components that represent various parts of the user interface. These components can be reused throughout the application, making it easy to build complex user interfaces.
- Setting up a React Project
To create a new React project, you can use the create-react-app tool. Run the following command in your terminal to install create-react-app globally:
npm install -g create-react-app
Then, create a new React project by running the following command:
create-react-app my-react-app
cd my-react-app
npm start
This will start a development server and open the React application in your default web browser. You can start modifying the code in the src folder to build your React application.
- React Components
React is all about components. Components are the building blocks of a React application and are reusable pieces of code that represent a part of the user interface. You can create components by extending the React.Component class or by using stateless functional components. Here is an example of a simple component:
import React from 'react';
class App extends React.Component {
render() {
return (
<div>
<h1>Hello, World!</h1>
</div>
);
}
}
- State and Props
State and props are two important concepts in React. State is mutable data that belongs to a component and can be updated using the setState method. Props are immutable data that are passed from a parent component to a child component. Here is an example of a component using state and props:
import React from 'react';
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
message: 'Hello, World!'
};
}
render() {
return (
<div>
<h1>{this.state.message}</h1>
<ChildComponent message={this.state.message} />
</div>
);
}
}
const ChildComponent = (props) => {
return <p>{props.message}</p>;
}
- React Routing
React Router is a library that allows you to add routing to your React application. You can define different routes in your application and render different components based on the current route. Install react-router-dom by running the following command:
npm install react-router-dom
Then, define routes in your application by importing Route and BrowserRouter from react-router-dom:
import React from 'react';
import { BrowserRouter, Route, Switch } from 'react-router-dom';
const App = () => {
return (
<BrowserRouter>
<Switch>
<Route exact path="/" component={Home} />
<Route path="/about" component={About} />
</Switch>
</BrowserRouter>
);
}
const Home = () => <h1>Home Page</h1>;
const About = () => <h1>About Page</h1>;
- Hooks and Context API
Hooks are a new feature introduced in React 16.8 that allow you to use state and other React features without writing a class. The useContext hook allows you to pass data through the component tree without having to pass props down manually at every level. Here is an example of using the useContext hook:
import React, { useContext } from 'react';
const MyContext = React.createContext();
const App = () => {
return (
<MyContext.Provider value="Hello, World!">
<ChildComponent />
</MyContext.Provider>
);
}
const ChildComponent = () => {
const value = useContext(MyContext);
return <p>{value}</p>;
}
- 6+ Projects
Throughout this course, you will build 6+ projects to practice your React skills. These projects will cover a range of topics including:
- A Todo List app to practice basic React concepts
- A Weather App using a third-party API
- A GitHub Profile Finder app to search for GitHub profiles
- A Movie App to display information about movies
- An E-commerce Website to practice complex component structures
- A Blogging Platform to practice routing and state management
- Conclusion
Congratulations on completing the React JS Full Course 2024! You have learned the fundamentals of React including components, state, props, routing, hooks, and the Context API. You have also built 6+ projects to practice your React skills. Keep practicing and building new projects to become more proficient in React development. Happy coding!
⏰ ▬▬▬▬▬▬ T I M E S T A M P S ▬▬▬▬▬▬⏰
00:00:00 Introduction
00:05:15 ES6 concepts introduction
00:09:03 Template literals
00:11:00 Ternary operators
00:14:21 Object and array destructuring
00:20:05 Default parameters, spread operators and rest parameters
00:27:03 ES6 array methods
00:40:32 async await API call example
00:44:55 Installing react app using create react app and vite
00:59:00 class based components
1:04:10 functional components
1:07:55 Nested components
1:13:50 List and keys
1:17:15 Props
1:25:20 Styling react apps
1:32:55 conditional statements
1:40:00 state and setState
1:47:50 lifecycle methods in class components
2:01:30 useState hook
2:06:40 useEffect hook and manage dependency logics
2:15:50 data fetching using useEffect
2:23:20 manage loading state
2:27:33 useContext and react context api
2:45:15 useReducer hook
2:59:59 Todo list using material UI
3:28:52 Form handling
3:37:00 Form submission
3:50:25 dynamic form creation
4:16:35 React router dom introduction
4:18:00 browserRouter
4:20:20 Routes/Switch and Route component
4:22:15 useNavigate hook
4:24:00 Link component
4:25:15 dynamic route pages
4:28:00 useParams hook
4:29:00 useLocation hook
4:30:28 not-found page logic
4:32:00 Common layout using outlet component
4:38:00 useRoutes Hook creation
4:44:54 useFetch custom hook
4:57:00 useWindowResize custom hook
5:03:40 react hook form
5:16:15 useRef hook
5:23:10 useMemo hook
5:31:43 useCallback
5:37:13 React query/Tanstack Query
5:50:44 Shopping Cart
7:25:30 React firebase auth
8:35:50 Redux tookit
9:38:30 React with zustand
9:57:25 Unit testing using jest and react testing library
11:01:40 Mern Stack task management app
Thomas Carol Gonzalez Eric White John
very very nice content i like this
Lopez Christopher Hernandez Ronald Clark Eric
wow nicely taught man thanks
Great content with clear explanations. Thumb up bro
just finished thanks for the video
waiting for part 2
at 1:55:13, why did you copy this.state unnecessary here —> this.setstate({ …this.state, changeColorStyle : !this.state.changeColorStyle }) or there is something i am missing ??
FireBase 7:25:30
Your content is to the point .,. And I really love man ,, you are making industry level of content .. I have never seen any youtuber has made this type of contents .. May God Bless You !. I wish I would buy a cup of coffee.
Miller Shirley Taylor Melissa Rodriguez David
Flow, The Concepts you are trying to explain are fair enough, But a few aspects are not so comfortable, you are going with your flow that a beginner can't understand or follow (eg. the Forms section), it is too complicated to understand.
Perez Kevin Lewis Melissa Martin Anthony
Williams Donna Williams Jason Lee Nancy
Hernandez Maria Robinson Matthew Hernandez Daniel
Good info
Thomas Angela Johnson Elizabeth Thomas Sarah
Hernandez Robert Jackson Nancy Wilson Kimberly
❤