HomeVideos

50+ HOURS REACT.JS 19 MONSTER CLASS

Now Playing

50+ HOURS REACT.JS 19 MONSTER CLASS

Transcript

876 segments

0:00

so before we dive into the course first

0:01

of all I want to mention a few things I

0:04

can't make any promises but I can

0:06

confidently say that this course will

0:08

give you a job and what I can promise is

0:11

that this course will take you from zero

0:13

to a react expert a react monster that I

0:18

can definitely give you a promise now

0:20

you might be wondering why I'm so sure

0:22

about this and the answer is simple I

0:24

began learning reactjs in 2018 and

0:27

started teaching it in 2001 I appload my

0:30

first reactjs course on my YouTube

0:32

channel 2 years ago or almost 2 years

0:34

ago and since then I gained extensive

0:37

experience by building numerous projects

0:40

and working with different companies now

0:42

I'm eager to Lear you a job now I know

0:45

that's a lot of things that I just said

0:47

now the real question is what you can

0:49

expect from this course in this course

0:52

you're are going to be learning a lot

0:54

and I mean a lot of things so now let me

0:56

explain all of them one by one in one

0:59

breath first of all we are going to be

1:00

starting from the react fundamental by

1:02

building 10 projects and countless

1:04

exercises then we will jump to react

1:06

with time script by building five

1:07

projects and countless exercises then

1:10

react hook form with one project Des UI

1:12

shads and UI redex UI tman CSS simple

1:15

hooks advanc hooks learn everything

1:18

about Zeus by building 10 projects every

1:20

single thing I know about the framer

1:22

motion and also animation in general by

1:24

building 10 projects 10 stack query 10

1:27

stack router and also if you guys don't

1:30

know the 10 stack framework which was

1:32

just launched 3 days ago and you will

1:34

learn all of that by building 10 more

1:36

projects then we're going to be jumping

1:38

into the advanced Parts like design

1:39

patterns in reactjs design system in

1:42

reactjs react testing Redux toolkit with

1:44

two full stack projects next CH from

1:47

beginning to advanced level react native

1:49

with projects and also we are going to

1:51

be building Advanced projects okay that

1:54

was a lot of thing that I just explained

1:57

I'm going to break them down one by one

1:58

in a few seconds but yeah this is what

2:00

you can expect from this course and this

2:02

course is still in the construction you

2:05

are watching only the first part of this

2:07

course and which is about like almost uh

2:10

11 or 12 hour of content so you are

2:12

watching the first part of this course

2:14

and in the upcoming series we're going

2:16

to be covering the rest of these topics

2:18

which I just mentioned so yeah I'm super

2:20

excited and I hope you are too now

2:22

finally I want to talk about one final

2:25

thing and I promise then we will jump to

2:26

the course I've mentioned this in my

2:28

previous courses in my react native

2:30

course and also in my data structure and

2:31

algorithm course that if you don't want

2:33

to subscribe to my YouTube channel you

2:35

don't have to if you don't want to send

2:37

me a money you don't have to if you

2:39

don't want to follow me on Instagram or

2:41

in X or Twitter whatever you want to

2:43

call that you don't even have to follow

2:44

me anywhere you don't have to do nothing

2:47

for me but now if you are taking some

2:49

Advantage from my course please do not

2:51

download my courses if you don't want to

2:53

follow me here and there I can totally

2:55

understand like why but if you are

2:57

watching my courses and you are making a

2:58

career out of there and still if you are

3:01

downloading my courses that's not fair

3:03

like I can't do anything about that

3:04

because YouTube doesn't have the

3:06

download feature but yeah like if you

3:08

watching my content please do not

3:10

download that so yeah let's get into the

3:12

course and I'm going to make you a react

3:14

monster so now let's talk about what are

3:16

the things that you have to know before

3:18

jumping into this course so you only

3:20

need to know HTML and CSS that's going

3:23

to be the main prerequisites for this

3:24

course you don't have to know SS and

3:27

this one is optional but I will highly

3:29

recommend commend you to learn tailn CSS

3:31

because in this course we're going to be

3:33

building a lot of projects and for The

3:34

Styling we're going to be using tailn

3:36

CSS so this one is optional but yeah

3:39

once again my recommendation will be to

3:42

learn that and also you have to know

3:44

JavaScript but in this course you can

3:46

definitely skip the O op part you don't

3:48

have to know what a oop is to take this

3:50

course which you are currently watching

3:52

right now and if you guys already saw my

3:56

old react J course where in the world is

3:59

the okay let me just search for there we

4:01

go if you guys are wondering like should

4:03

I have to watch this course before

4:04

jumping into this reactjs course the

4:06

video which you are currently watching

4:07

right now you don't have to watch this

4:10

video and even though I'm going to

4:12

private this video and ah God damn it

4:15

you also have to know typescript I

4:17

forgot this one you also have to know

4:20

this typescript now let me just say that

4:21

once again HTML CSS tell CSS JavaScript

4:25

and typescript so that's the only thing

4:27

that you have to know for watching this

4:29

course so now let's get into the cording

4:31

so what is reactjs react is a free and

4:33

open source JavaScript library specially

4:36

designed for building the user

4:37

interfaces now there are a few buzzword

4:39

in this definition let me clarify that

4:42

for you so the first one we have is a

4:44

open source so what is a open source

4:46

open source refer to the type of

4:48

software or basically anything where the

4:51

source code is made available to the

4:52

public this means that anyone can view

4:55

modify and distribute the code of that

4:56

specific thing and in our case in reactj

4:59

yes now what is a library library is a

5:02

collection of pre-written code that

5:04

developer can use to perform a common

5:06

task or add a specific functionality to

5:08

their applications now what is a UI UI

5:11

or the user interface is the means

5:13

through which the user interact with our

5:15

application reactjs was created in 2011

5:18

it uses something called the component

5:20

model which we will discuss more in

5:22

detail in this course but not right now

5:24

it allows us to build modular apps and

5:26

finally there is a saying about reactjs

5:28

that learn it once and write it anywhere

5:31

so now let me break all of them one by

5:32

one B is the most popular powerful

5:34

frontend Library developed and sponsored

5:37

by Facebook a component is just a piece

5:39

of the UI that has its own logic and

5:41

appearance a component can be small as a

5:43

button or large as entire application

5:46

you'll discuss more about components in

5:47

more great detail later in this course

5:49

but not right now if you learn react GS

5:51

once you will not only be able to build

5:53

only the websites but you can also build

5:56

the mobile application desktop and also

5:58

even the virtual reality and there are a

6:01

lot more things that you can do with

6:02

reactjs so you just have to learn it

6:04

once and write it anywhere so that was

6:06

just a quick intro to react GS and now

6:09

let me make a setup forward coding

6:10

journey in this course we'll be using a

6:12

vs code for writing work code and you're

6:14

more than welcome to use any text eror

6:16

that you prefer you can use Sublime Text

6:18

you can use jbr products you can use

6:20

anything that you prefer but in my case

6:22

I'm going to be using a vs code for

6:23

writing my code now to install reactjs

6:25

first we will need to open your terminal

6:27

after that we have to type this command

6:29

npm create weat at latest hit enter next

6:34

we have to provide some sort of a name

6:35

for our project I'll call mine as react

6:38

demos you can call it like anything that

6:40

you want next we have to select the

6:42

framework I'll choose reactjs because we

6:44

are now learning reactjs and yeah I'm

6:46

going to just choose reactjs next we

6:48

have to select the variant for now I'll

6:50

just choose JavaScript because I know

6:53

there are a lot of people who are

6:54

watching this course they don't have the

6:56

knowledge of typescripts so if you are

6:58

someone who already know what typescript

7:00

is you don't have to worry about that

7:01

like we going to be still using a

7:03

typescript in this course but not right

7:05

now so yeah I'm going to just choose

7:07

JavaScript for now but later we are

7:09

going to be using a typescript in this

7:11

course now we have to go inside that

7:13

folder by using a CD command or you can

7:15

say the current directory command now

7:17

I'm going to use the code Dot and hit

7:19

enter so it's going to open that in my

7:21

vs code now want you to open your

7:22

integrated terminal inside your vs code

7:25

and just type this command so you can

7:27

either use npmi or you can use PM

7:29

install if you wanted to so both of them

7:31

will work totally fine so it's going to

7:33

install all of the packages by which or

7:35

reactjs is depends on so it's going to

7:37

take a bit of time I'm going to fast

7:38

forward the video right now let's

7:40

discuss these files and folders so the

7:42

first folder that we have is a node

7:43

modules folder and this folder has all

7:45

of the module and packages by which or

7:48

reactjs is depends on and later in this

7:50

course if you install any third party

7:52

packages that will be also included in

7:54

this folder so the next folder that we

7:56

have is a public folder and public is

7:58

the folder where we put all for assets

8:00

file like HTML Etc next we have a SRC

8:03

folder and SRC or source is the hard of

8:07

for entire project and we're going to be

8:09

spending like almost 90% of our time in

8:11

this folder so now inside this SRC

8:14

folder we have a few more files and

8:16

folder so the first one we have is the

8:18

asset folder and as the name suggest

8:20

that in this folder we are going to be

8:21

putting like all of our assets files and

8:23

folder like images svgs external icons

8:26

and so on and so forth next we have two

8:28

other files like app. CSS and also

8:31

index.css so as the name suggest that

8:33

we're going to be writing our style

8:35

inside these files so we are going to be

8:37

providing our style for our UI inside

8:40

these files next we have two more files

8:42

like app.jsx and also main. jsx these

8:45

are something called the component file

8:47

which we're going to be discussing later

8:48

in this course but you don't have to

8:50

worry about that for now next we have a

8:52

GE ignore file and this is a GitHub

8:54

related file when we are pushing our

8:56

code to GitHub this file allows us to

8:58

ignore a certain file or folder for

9:00

example like this node modules folder is

9:02

a huge folder and if you don't want to

9:04

push that to our gab repository so we're

9:06

going to be just putting the name of our

9:08

node modules folder in inside this dog

9:11

ignore file and it's going to just

9:12

ignore that whenever we are pushing our

9:14

code to our giab repository next we have

9:16

our es. config.js file and this is a

9:19

configuration file for our es next we

9:22

have our index. HTML file and this is

9:24

the most important file because in this

9:27

file we have our HTML content and we

9:29

also have a deal with ID of root or rejs

9:32

will select this element and render all

9:34

of our content to that specific day like

9:38

I'm going to show you from where we are

9:40

selecting that day with a class of Route

9:42

I mean like with the IDE of root next we

9:44

have our package.json file and this file

9:46

is the heart of our project it contains

9:48

metadata about the project such as like

9:50

project name version description and

9:53

scripts and more importantly it list the

9:55

dependencies and their version that

9:57

where project needs to run here is

9:59

something which we're going to be

10:00

discussing later in this course next we

10:02

have a package log.jn file file is

10:05

automatically generated and updated when

10:07

install or modify dependencies it locks

10:09

the version of all of the packages and

10:11

their dependencies to ensure a

10:13

consistent and reproducible build

10:15

envirment something which you don't have

10:17

to worry about okay so next we have a

10:19

simple readme.md file and this file

10:21

provides the summary of what our project

10:23

is about it usually include information

10:25

like project purpose feature and aims to

10:28

accomplish about this spefic specific

10:29

project we can also preview there by

10:31

clicking on this icon and here you can

10:33

see and this is how our preview will

10:34

look like once we push our code to our

10:36

gab repository next we have our V.C

10:39

config.js file and this file is used to

10:41

provide configuration for the V itself

10:44

so yeah that was a lot about the files

10:46

and folders and you don't even have to

10:48

worry about these files and folder to be

10:50

honest and now I'm going to remove all

10:51

of the unnecessary stuff from our

10:53

project time for the cleanup so for now

10:56

we don't need this public folder so I'm

10:57

going to select them and delete them

10:59

next we also don't need this SS folder

11:01

so I'm going to remove that from here we

11:03

also don't need the app. CSS and also

11:06

the index.css as well next we have to go

11:09

inside this men. jsx and just remove

11:12

this line of code so I'm going to just

11:13

remove the SMI file and now finally I'm

11:16

going to go into my f. GSX file I'm

11:18

going to select every single thing from

11:20

this file and I'm going to just remove

11:22

that from here and next I'm going to be

11:24

just creating something called a

11:25

component but you don't have to worry

11:26

about what a component is for now so

11:28

I'll just use like const app and I'll

11:31

just use my arrow function and return

11:34

just H1 or you know what not H1 I'll

11:36

just return like section which will say

11:39

like hello now I'm going to save my file

11:41

and now to run this code I'm going to

11:43

have to open my integrated terminal and

11:45

now just use my npm run Dev so it's

11:47

going to run my code on this port right

11:49

here so I'm going to copy that or you

11:51

can just hold command or control and

11:53

click on there and we are getting this

11:55

error right here this because we now

11:57

successfully created this component but

11:59

we also have to export this so that we

12:01

can use it in other files so I'm going

12:02

to use like export default and then my

12:04

app so if I sve there and I'm going to

12:07

have to refresh there so what are we

12:08

getting we are now getting our hello

12:11

right here which is amazing so yeah this

12:13

is how we going to be removing all of

12:15

that unnecessary stuff from our project

12:17

so what is component components are

12:19

independent and reusable bits of code

12:22

they serve the same purposes jscript

12:24

function but work in isolation and

12:26

return HTML or jsx to be size so

12:29

something which we're going to be

12:30

discussing very soon cregs allows us to

12:33

make our website modular by using

12:35

something called the separation of

12:36

concern so if I ask you to build this UI

12:40

so how can you go about doing that if

12:42

you are coming from HTML cssa and

12:43

JavaScript background you will first

12:45

create index.html file then CSS file

12:48

then Javascript file and in the HTML

12:51

file you will put all of your structure

12:52

for this project then in the CSS file

12:55

you will put all of the styling and in

12:56

the Javascript file you will provide the

12:58

functional to it this process is still a

13:01

separation of concern but in reactjs we

13:03

can do that a bit more better in reactjs

13:06

we can split this entire project into

13:09

multiple components or you can say the

13:11

parts so you can either say like

13:14

components or parts so if you want to

13:16

build this project by using reactjs we

13:18

will start by creating a component for

13:20

the nailbar and in there we will put our

13:22

HTML CSS and JavaScript inside their

13:25

specific file then we will create

13:27

another component for a search bar next

13:29

next for the menu and also for the

13:30

article and also finally we'll create a

13:33

component for the card and we will reuse

13:36

that card again and again in our UI so

13:38

that was about the theory but how are we

13:40

going to make a component a component

13:42

you just have to create a JavaScript

13:44

function but whenever you are creating a

13:46

component you have to keep a few things

13:48

in mind the first thing that you have to

13:50

keep in mind is that the first letter of

13:51

your component name should be uppercase

13:54

you can also create your component by

13:56

either using the function resert keyword

13:58

or you can create your component Arrow

14:00

function syntax as well the final thing

14:02

that you have to keep in mind is that

14:04

anytime you are working with a component

14:06

you have to return some sort of HTML

14:08

from that component Now to create a

14:10

component I'm going to go into my

14:11

app.jsx file and I'm going to remove

14:13

every single thing from there because I

14:15

want to start from scratch so as I said

14:16

that components are just a JavaScript

14:18

function so if I just create a

14:20

JavaScript function by using either the

14:21

function resert keyword or I can also

14:24

create my component by using the arrow

14:26

function so for now I'll just stick with

14:28

this function resert keyword and by the

14:31

way anytime you are creating a component

14:33

there are two things that you have to

14:34

keep in mind number one the first letter

14:37

of the name should be uppercase and the

14:39

rest of them will be lower case so if I

14:41

want to give my component as the name of

14:42

like app the first letter should be

14:45

uppercase and the rest of them can be

14:47

like anything you can create the as

14:49

uppercase or lower case that's only on

14:51

you but the first letter should be upper

14:53

case I'm going to just give it the name

14:54

of like app and the next thing that you

14:56

have to keep in mind is that from the

14:58

component you always like always have to

15:01

return some sort of a GSX we did not

15:03

discuss about GSX not right now but we

15:06

will very soon so I'm going to just

15:08

write my H1 right here and I'll just

15:10

write like hello word so now if I sve my

15:13

file this is how we are going to be

15:14

creating our component but now we have

15:16

to tell our reactjs that now we

15:18

successfully created this component we

15:20

want to render that to our UI so to

15:22

render that to our UI first of all we

15:24

have to export that so that we can use

15:26

the in other places of our project so

15:28

I'm going to just use like export

15:29

default and then F so as soon as I do

15:32

that and save my file now I'm going to

15:34

open my terminal right here I'm going to

15:36

just use my npm run Dev and here you can

15:38

see we are now getting our hello word

15:39

right here from our component so what's

15:41

going on so now we successfully creating

15:43

our component and now we exporting there

15:45

so that we can use this component in

15:47

other part of our project so where we

15:50

are using that component so if I go into

15:52

my main. jsx file right here so here you

15:55

can see we are now rendering this

15:56

component right here so first of all we

15:59

are now importing this component which

16:01

we just created right here inside this

16:03

app.jsx file and now we are exporting

16:05

there and here inside this men. jsx file

16:08

we're now importing this component and

16:10

we are now rendering that to or UI and

16:14

as I said previously that I want you to

16:16

keep in mind this root now we are

16:18

selecting that root right here by using

16:20

document. getet element by ID and we are

16:23

now selecting that root which is inside

16:26

this index.html file as you can see

16:28

right here now we are selecting that

16:29

root so here you can see we have a root

16:31

ID and we are now selecting there by

16:34

using document. element by ID right here

16:37

and now inside that route like this

16:39

route we are now rendering our app

16:42

component right here so that's the only

16:43

reason we're now getting this hello

16:45

world right here so if I change

16:46

something inside that component like if

16:48

I go into there and I'm going to just

16:50

change that to like my own name maybe

16:52

now if I save there and here you can see

16:53

I'm now getting my own name so yeah this

16:55

is how we are going to be creating a

16:57

component and let me just say that once

16:58

again anytime you want to create your

17:00

component the first letter will be upper

17:02

case and the rest of them can be either

17:04

upper case or lower case or that's only

17:06

on you and also we have to return some

17:09

HTML from this function okay so we can

17:12

also refactor this code to use Arrow

17:14

function so I'll just use like const and

17:16

I'm going to just convert this function

17:17

to use the arrow function if you prefer

17:20

this way you can also create your

17:21

component by using this Arrow syntax or

17:24

you are more than welcome to use this

17:26

function Reser keyword right here so

17:28

yeah this is how we are going to be

17:30

working with components welcome to the

17:32

first challenge of this course so here

17:34

is the UI and I want you to split this

17:36

UI into multiple components you don't

17:39

have to write any code for that just get

17:41

a pen and paper if you have that but if

17:43

you don't have a pen and paper you can

17:44

also use some sort of a photo editing

17:46

software which will allow you to just

17:48

Mark a few things inside this UI and

17:50

make them as a separate component and

17:52

yeah we also have another part of this

17:54

challenge which we are going to be

17:55

seeing in a few seconds but I want you

17:57

to go ahead and pause the video and do

17:59

this challenge by yourself so if you can

18:01

do it then come back and watch the

18:02

solution and now I'm going to give you

18:04

my solution so I'm going to use a figma

18:06

for there and if you want to use some

18:07

sort of other Pho editing software you

18:09

are more than welcome to do that so the

18:11

first thing that I want to do is that I

18:12

want to create a component for this

18:15

burger menu so I'm going to just create

18:16

a separate component and I'm going to

18:18

put like all of the structure The

18:19

Styling and also the functionality

18:21

inside that component and then I will

18:24

also create a component for the

18:26

navigation so I'll just create a

18:27

navigation right here and excuse my

18:31

drawing and also my bad uh yeah you get

18:36

the idea so this is how we are going to

18:37

be creating a component for the

18:38

navigation we can also split this entire

18:41

navigation into multiple components but

18:43

we don't have to like this is going to

18:45

be enough for this navigation component

18:47

we will put our logo inside there we

18:50

will also put our search field which

18:52

will allows us to search our uh stuff

18:54

inside this Wikipedia and finally we are

18:56

going to be also providing our create

18:58

account and also the login and we also

19:00

have these three dots and I don't have

19:02

any idea what the hell these three dots

19:04

do okay so that's going to be my second

19:06

component next we're going to be also

19:08

creating a component for the banner in

19:10

some situation we would want to show

19:12

this banner and in a lot of times we are

19:14

not going to be showing this Banner so

19:16

yeah this is going to be basically my

19:18

primary component and there is a big

19:20

difference between like uh huge

19:22

component and a small component which we

19:23

are going to be seeing inside this

19:25

course but not right now so this is

19:27

going to be my third component component

19:29

for the banner okay and also we are

19:31

going to be creating a component for the

19:33

sidebar or you can just give it the name

19:35

of like a side if you want it to but I'm

19:37

going to give it the name of like

19:38

sidebar and I guess that's going to be

19:40

fine okay and also we're going to be

19:43

creating a component for the appearance

19:45

so I'm going to also Mark there as a

19:47

separate component okay so we can also

19:50

split this entire U into like nested

19:53

component as well we can also create a

19:55

separate component for these radio

19:57

button if you wanted to but but we don't

19:59

have to do that okay and also we're

20:01

going to be creating a component for the

20:03

header so now let me just highlight that

20:06

right here just

20:09

like that so this is going to be

20:11

basically our header and finally we are

20:13

going to be creating a component for our

20:15

main content so this is going to be

20:17

basically our huge component which will

20:19

allows us to render all of that content

20:21

right here inside this uh Wikipedia okay

20:25

like once again we don't have to create

20:27

a component for all of there we can put

20:29

all of that entire logic into one

20:32

component if you wanted to but that's

20:34

not going to be the ideal way to create

20:35

our website or our apps so that's why we

20:38

are going to be splitting this entire UI

20:40

into multiple components so yeah that

20:43

was the part one of our challenge one

20:45

next we have to create a new file called

20:47

grid. jsx and inside that file we're

20:50

going to be creating our grid component

20:51

by using the function decoration syntax

20:53

after that we are going to be

20:54

refactoring that code to use the arrow

20:57

function instead and finally we just

20:59

have to render that into our app

21:00

component so once again give it your

21:02

best shot if you can do it that's

21:04

completely okay then come back and watch

21:05

the solution and I'm going to give you

21:07

my solution so what I'm going to do is

21:09

that I'm going to create a component

21:10

folder and I'm going to give the name of

21:12

like G do uh not TSX but genesic and I'm

21:15

going to use my RFC so it's going to

21:17

gives us all of that code but I'm not

21:19

going to do that I'll just create a

21:21

function and now I'm going to give it

21:23

the name of like greed it's not going to

21:24

take any perimeters so I'm going to

21:26

remove them and finally we only have to

21:28

return what H1 and which will just say

21:30

like GRE or hello word would be fine so

21:33

I'm going to sve my file now we have to

21:35

export this component so that we can use

21:36

that in other files so I'm going to be

21:38

using like export default of grid so now

21:40

I'm going to save my file let me go into

21:42

my app.jsx component and let's just

21:45

register that component right here okay

21:48

so if I save my file and here you can

21:50

see we now getting our hello word right

21:51

here which is looking amazing but I'm

21:53

going to go in there and refactor this

21:55

code to use the arrow function so I'm

21:57

going to remove that and change the to

21:58

const and also make there as Arrow

22:01

function so now if I save my file and

22:03

still we getting that same result which

22:05

is saying hello word okay so yeah that

22:07

was our first challenge in this course

22:09

we usually create a separate components

22:12

folder and we put our components inside

22:15

there so I'm going to just create two

22:16

component with the name of like greet or

22:19

greeting. jsx and also add. jsx and by

22:22

the way you can give it any name that

22:24

you prefer and now I'm going to just

22:26

create my greet component right here

22:29

here and I'll just return my H1 which

22:32

will say uh hello or yeah hello would be

22:36

fine I'm going to sve my file and I'm

22:38

going to show you extension which will

22:39

help you a lot so I want you to go into

22:42

your extension area and just search for

22:44

reactjs and once you do here you can see

22:46

I want you to install this extension in

22:48

your vs code just install this extension

22:50

and it's going to give you a lot of

22:51

Snippets okay so throughout the course

22:53

I'm going to show you a lot of uh

22:54

Snippets which you can use but by the

22:57

way if you want to use them so you you

22:58

have to install that in your vs code so

23:00

this component took a lot of time to

23:02

write now in this component I'm going to

23:04

just use r a f c e okay so you just have

23:07

to write there and once you hit enter so

23:10

here you can see it's going to gives us

23:11

the entire boiler plate of our component

23:13

let me just show you there once again

23:16

you just have to write ra fce and hit

23:19

either tab or hit enter it's going to

23:20

give us that entire component right here

23:22

so if I save my file now that we

23:24

successfully created our add component

23:26

and also our GRE component and by the

23:29

way we also have to export that so we

23:30

can use it in other files so we have to

23:32

just use export default and then grid

23:35

okay so if I save my file now the next

23:36

thing that we have to do is that we have

23:37

to register the inside or app components

23:41

so that we can see them on the screen so

23:42

I'll just remove this H1 from here and

23:45

I'll just use my grid first of all and

23:47

as soon as I hit enter here you can see

23:49

it will automatically import this so if

23:51

it didn't you have to import them

23:52

manually so now just close there like

23:55

this and by the way this is how we call

23:57

our component this is how we register

23:59

our component this is how we export them

24:02

and this is how we call them okay so if

24:04

I save my file and here you can see we

24:07

are now getting our hello right here

24:09

which is coming from this create

24:10

component I'll remove that from here and

24:13

I'll also render my ADD component and if

24:15

I hit enter so it's going to

24:16

automatically import there now I'm going

24:17

to save my file and what are we getting

24:19

we are now getting our add right here so

24:21

we can write like anything that you want

24:23

so I'll just write like something cool

24:26

and now if I save my file and we're now

24:27

getting what something cool right here

24:29

so yeah this is how we can create a

24:31

separate component folder and we can put

24:33

our entire components inside there

24:35

welcome to another challenge so in this

24:37

challenge you're going to be creating

24:38

three components and a lot of j6 inside

24:41

there so the first thing that I want you

24:43

to do is that I want you to create a

24:44

header. jsx file and inside that file

24:46

you are going to have to create your

24:47

functional component with the name of

24:49

header and inside that header you're

24:50

going to be returning the header element

24:53

and inside that header element you're

24:54

going to be creating H1 which will say

24:56

like welcome to my website and also so

24:58

you're going to be creating underneath

25:00

this H1 you're going to be creating your

25:01

navigation and that navigation will have

25:03

three anchor tags the first one will say

25:06

home the second one will say about and

25:08

the third one will say contact so that's

25:10

going to be the first part of this

25:12

challenge okay so if you want to give it

25:15

a shot right now so you can totally go

25:17

ahead and give it a shot but now I'm

25:18

going to explain these two and then I'm

25:20

going to give you my solution the next

25:21

thing that you have to do that create a

25:23

photo. jsx file and create your

25:25

functional component inside there it

25:27

will only return the folder element and

25:29

inside that folder element you're going

25:31

to be providing a paragraph which will

25:32

say like copyright uh 2024 or it should

25:36

be 2025 my bad but yeah you can proide

25:39

like basically any basically anything

25:41

that you like but in my case I'm going

25:42

to specify like copyright 2024 or 25 in

25:46

my website and that's the second part

25:48

and now for the third part you're going

25:50

to be creating your main component and

25:52

that main component will just return

25:54

your main element and also inside that

25:57

main element you're to be creating your

25:59

H2 which will say like main content and

26:01

now underneath that H2 you're going to

26:02

be creating a paragraph and you can like

26:04

basically put anything that you prefer

26:07

so give it to your best shot if you can

26:08

do it that's completely okay then come

26:10

back and watch the solution and then I'm

26:12

going to give you my solution and

26:13

basically you're going to be just

26:14

importing there and putting there right

26:15

here inside the app component so now let

26:17

me just show you all of that so the

26:19

first thing that I want to do is that I

26:21

want to create my header. jsx and I'm

26:23

going to be using my RFC for the sem my

26:26

file I'm going to remove this header

26:27

from there and provide my H1 which will

26:29

say like welcome to my website okay so

26:33

that's going to be the first thing next

26:34

we also have to create our navigation

26:36

and inside this navigation we're going

26:38

to be creating a three anchor tag so if

26:40

I just use like this a and times three

26:43

so it's going to give us this anchor tag

26:44

like three times so for the first one

26:46

we're going to be providing a home and

26:48

for the second one we're going to be

26:50

providing about and also for the third

26:53

one we are going to be providing a

26:54

contact okay so if I just write like

26:56

contact and sem my file so it's going to

26:58

form form there for me I'm going to go

26:59

ahead and go to my app and register my

27:01

header component right here okay let's

27:04

just import there and registered that

27:07

here so now if I save my file and here

27:09

you can see we're now getting more

27:10

welcome to my website home about and

27:12

contact so that was the first part now

27:14

in the second part we're going to be

27:16

creating a main component okay so I'll

27:18

just say like main. jsx and inside there

27:21

we're going to be creating our RFC or

27:23

you know what it should be a main you

27:26

know what you can like basically give it

27:27

any name that you prefer but in my case

27:29

I'm going to give it the name of like

27:30

main content and change that to main so

27:33

I'm going to copy there and let me just

27:35

place there right here okay and I'm

27:37

going to also use the H2 which will say

27:39

like main content and now need that

27:41

we're going to be creating our paragraph

27:43

which will say like this is the main

27:45

content and now I'm going to save that

27:47

now let me just go ahead and go to my

27:49

app and register my main component right

27:52

in here and now here you can see we're

27:54

now getting like main context content

27:59

content there we go so now if I save my

28:01

file and now we are getting like main

28:03

content and this is the main content

28:05

which is looking amazing now for the

28:07

final component we're going to be

28:08

creating our footer. jsx and now inside

28:11

there we're going to be using our RFC

28:13

and remove this Dev and change that to

28:16

folder okay let's just provide our

28:18

paragraph which will say copyright

28:21

2025 my website so now if I save my file

28:24

we also have to registered that inside

28:26

our app component l like so okay and I'm

28:31

going to register this semi file and now

28:33

we are getting our copyright 2025 my

28:36

website so that was another challenge

28:39

about the basic component what is jsx

28:42

jsx allows us to write HTML in reactjs

28:45

jsx makes it easier to write and add

28:48

HTML in reactjs so this is how our jsx

28:51

looks like so first of all we have our

28:53

component and inside this component we

28:55

are now returning some HTML now I know a

28:58

lot of you will ask me hose like why

29:00

can't we just call it HTML why are we

29:02

calling it jsx jsx simply means

29:05

JavaScript XML behind the scene we're

29:08

working with JavaScript this is just the

29:10

illusion of HTML this is not HTML code

29:14

behind the scene your reactj compiler

29:16

will compile our code into pure

29:19

JavaScript so don't believe me now let

29:21

me show you now let me write a bit of

29:23

jsx so that you guys can see how we can

29:25

work with jsx so I'll just create a

29:27

section and inside this section I'll

29:29

also provide a bit of ID to it so I'll

29:31

just give the name of like section and

29:33

inside this section I'll create my H1

29:35

which will say my website underneath

29:37

this H1 I'll create my article and

29:40

inside this article I'll create H2 which

29:42

will say like welcome to reactjs now

29:45

underneath this H2 I'll create a

29:47

paragraph and which will say like

29:50

paragraph

29:52

paragraph content or text I'm going to

29:55

also provide a class name to it and by

29:57

the way instead of writing a class you

29:59

have to write a class name and I'm going

30:01

to tell you why but you have to write a

30:03

class name for now and I'll just give

30:04

you the class name of text right here so

30:06

if I save my file and here you can see

30:08

we now getting our result right here so

30:10

if I right click on there and go to my

30:11

inspect element we are first of all

30:13

getting our root and now inside this

30:15

route we have our section with idea of

30:16

section we have our H1 we also have our

30:19

article and inside this article we have

30:21

this H2 and we also have this class we

30:24

are now providing a class name and here

30:26

you can see we are now getting a class

30:28

this is a gs6 rule which I'm going to

30:30

explain in a few seconds but yeah here

30:32

you can see this is how we can write

30:34

HTML inside our JavaScript function so

30:37

to combine all of them this is how we

30:39

can create our component now let me show

30:41

you how our reactjs convert all of these

30:43

HTML to JavaScript and to show you there

30:46

first of all you have to go into this B

30:48

js. and inside there you have to place

30:50

your HTML content so I'll just copy my

Interactive Summary

Ask follow-up questions or revisit key timestamps.

The video introduces a comprehensive React course designed to take learners from beginner to expert. The instructor emphasizes practical application through building numerous projects and exercises, covering fundamentals, TypeScript, various libraries like React Hook Form, and advanced topics such as design patterns and testing. The course also touches upon Next.js and React Native. The instructor shares their extensive experience in React since 2018, including teaching and building projects. Prerequisites include HTML, CSS, JavaScript, and optionally Tailwind CSS. The course setup involves using VS Code and Vite for project creation, explaining the project structure, and demonstrating how to run the development server. A significant portion is dedicated to explaining React components, their reusability, and how they enable modular development. The video includes coding challenges and solutions for creating and structuring components, introducing JSX as the syntax for writing HTML-like structures within JavaScript. It highlights key differences from standard HTML, such as using `className` instead of `class`.

Suggested questions

5 ready-made prompts