FatherPhi video
How to use React Components - Challenge 8 | FreeCodeCamp Tutorial
40 views ยท 2 likes ยท 1 comments
About this video
Vote for the next video here
๐๐๐
https://FatherPhi.com
Eleven labs is the crazy ai voice generation tool I use to fool ChatGPT
Try it out for free!๐ https://try.elevenlabs.io/6wbvspyzcq44
(Affiliate link)
For the weekly brief on accessible and practical Ai usage + updates on our latest mission join the newsletter
๐ https://master-of-ai.com
๐ฉ For business inquiries please reach out to phi@fatherphi.com
And since people are asking.
The camera I use to shoot these videos
๐น DJI Osmos Pocket 3 ๐ https://amzn.to/3O3Qw8R
Transcript
you're a phony
okay so for this video we're going to be
creating a reactor component and in the
last video we made a stateless react
component so this one's gonna have some
basic state it's not we're not really
gonna do anything with it but just so
you can understand it a little bit we're
gonna be creating a class called my
component and it's going to extend a
react component and from react component
we're going to pass it pass a
constructor props and the that props is
gonna be called by the super so that
super function is gonna pull the props
from the the main state and here they
want us to render something she was
talking about a kitten function or
something hidden class and has nothing
to do with this so I'm gonna go straight
to the requirements the react component
should return added state a div element
so we're gonna make it return something
it's going to return something within
quotes that's gonna be the JSX goes
there return okay so it's gonna be a
dude I'm gonna open the div close the
div always remember to close then the
return div should render an H 100 header
within it so h1 open close the h1 header
should contain the string hello react
hello react all right we can see the
output on the right but let's just run
the test and there we go
you
okay so for this video we're going to be
creating a reactor component and in the
last video we made a stateless react
component so this one's gonna have some
basic state it's not we're not really
gonna do anything with it but just so
you can understand it a little bit we're
gonna be creating a class called my
component and it's going to extend a
react component and from react component
we're going to pass it pass a
constructor props and the that props is
gonna be called by the super so that
super function is gonna pull the props
from the the main state and here they
want us to render something she was
talking about a kitten function or
something hidden class and has nothing
to do with this so I'm gonna go straight
to the requirements the react component
should return added state a div element
so we're gonna make it return something
it's going to return something within
quotes that's gonna be the JSX goes
there return okay so it's gonna be a
dude I'm gonna open the div close the
div always remember to close then the
return div should render an H 100 header
within it so h1 open close the h1 header
should contain the string hello react
hello react all right we can see the
output on the right but let's just run
the test and there we go
you