Skip to content

Instantly share code, notes, and snippets.

@talenguyen
Created December 27, 2018 03:41
Show Gist options
  • Save talenguyen/130387486210975c812ff8285444be4a to your computer and use it in GitHub Desktop.
Save talenguyen/130387486210975c812ff8285444be4a to your computer and use it in GitHub Desktop.
React Component

React component proposal

Requirement

  • Props & State
    • Props is properties and is passed to component from outside and immutable.
    • State is similar to props, but it is private and fully controlled by the component.
  • Reactive
    • Props changed -> re-render
    • State chagned -> re-render
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment