DEV Community

Cover image for Don't Stress: REACTJS | Components
Orion F.
Orion F.

Posted on

2 1

Don't Stress: REACTJS | Components

Hi readers,

Okay I am back with another post. This one will be about the ReactJS components. Let's go right into the notes I've taken for the components. Hope it helps. Enjoy!

*Components
- A part of the web interface.
- Header, SideNav, Main Content, Footer, and one component to contain the prior 4 components. They come together to make the app.
- Components are reusable. ie: The LEFT sideNav can also be the RIGHT sideNav.
- Building blocks of any ReactJS app.

*Component in Code
- a component is usually the code placed in App.js
- You can also have component files with the .jsx extension.

*Component Two Types
- Stateless Functional Component
(- JavaScript Functions)
- Stateful Class Component
(-Class extending Component class)
(-Render method returning HTML)

Top comments (2)

Collapse
 
gkhan205 profile image
Ghazi Khan

You can have a look in to my playlist for creating reusable component in react js. I have functional component with hooks to use state there.

Collapse
 
sergiodxa profile image
Sergio Daniel Xalambrí

JS functions could also be stateful components using hooks.

nextjs tutorial video

Youtube Tutorial Series 📺

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series 👀

Watch the Youtube series

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay