GroceriStar / react-only-13

GNU General Public License v3.0
0 stars 0 forks source link

Master React, Quick Code tutorial. Part 4 #6

Closed atherdon closed 6 years ago

atherdon commented 6 years ago

https://medium.com/quick-code/lets-learn-react-chapter-4-functional-x-class-based-component-227f89ea2192

1

khyati0212 commented 6 years ago

@atherdon

Summery:

  1. Here we are creating functional component in the Header.js file in place of class component
  2. The reason is that functional components acts as dumb components. So when it is needed just to display something on page than functional component is used.
  3. Class component has lifecycle method attached to them. So when you need access to life cycle method or state than class components are used.
atherdon commented 6 years ago

Ok, agree. please move to next chapter, while i'll create some complex question for you :)

khyati0212 commented 6 years ago

which is the next chapter? part 5 have issue #14.. so I am confused