Skip to content

Instantly share code, notes, and snippets.

@nishant8BITS
Created January 13, 2018 07:20
Show Gist options
  • Save nishant8BITS/bee6954c14eab9e02caa9f36d2158a17 to your computer and use it in GitHub Desktop.
Save nishant8BITS/bee6954c14eab9e02caa9f36d2158a17 to your computer and use it in GitHub Desktop.
// Function Component
// Well, as you know, function components are a little limited.
// All they know about is their current props. They can’t access previous props or external state.
// And they’re only re-rendered when their parent is; they can’t be re-rendered individually.
//
// class components give you the power to store state, communicate with the outside world,
// and re-render whenever you’d like. But class components can be simple, too! In fact,
// any function component can also be implemented as a class component.
//
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment