Understanding React Class Components vs Functional Components

08:57 You can directly skip to this , to see the examples of class component and functional component.

In this video we will compare the components in Reactjs Functional and Class Component. Lets see when to use each one of them.

In the video, we are seeing a live demonstration of how to write a Class component and Functional component. we also saw why Stateless Functional Components or SFC was changed to Functional Component or FC.

Some major differences in writing Class components and Functional Components are also covered in the video. How Class Components performs inheritance
on Reacts base components, i.e React.Component class.
Initially React followed OOPS or Object Oriented Programming, but later since 16.8+ React started to implement simple functions as a Component, which was later called as Stateless Functional Component and then modified to Functional Component.

In this video I have shown how Class component uses states and later we're gonna see how we can implement the same in Functional Components using either props or React Hooks.

Whenever we start React programming we have a mind set that Class Components are stateful and Functional Components are stateless, which is not true. We can make Class Component behave like stateless component and Functional Component as stateful and implement core Logic within it. You can find this details in the git commit mentioned below.

In our upcoming videos we are going to see state vs props, React Hooks, Custom Hooks, React Router, Redux, Custom Components, SPA or Single Page Application, Nesting of Components, How to pass data between sibling components, passing data from parent to child component, passing data from child to parent component and much more. We will also see some tips and tricks on Interview questions, so all in all, we will cover some basic, intermediate, and advanced React interview questions and concepts.

React is an Amazing technology, the more fun you have learning, the more fun I will have teaching.

git commit: SFC to FC - https://github.com/DefinitelyTyped/DefinitelyTyped/pull/30364

Please subscribe to our channel KnowledgeKeen to learn and understand the basics of development - https://www.youtube.com/c/knowledgekeen

What I use for shooting my videos - Tripod - https://amzn.to/3ASkf8F - OnePlus 7 - https://amzn.to/3xRJ2ry - Dell Inspiron 15 G3 3500 Gaming Laptop - https://amzn.to/2VWLMHr - Boya Microphone - https://amzn.to/3k4xNqP - Syska Lamp - https://amzn.to/3gccDWP"

#react, # reactjs, #classcomponentvsfunctionalcomponent,
Be the first to comment