Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save szaranger/563ae87e68aed2045cb69268a7c1e869 to your computer and use it in GitHub Desktop.
Save szaranger/563ae87e68aed2045cb69268a7c1e869 to your computer and use it in GitHub Desktop.
class MyComponent extends React.Component {
constructor() {
// initialize component instance
}
componentDidMount() {
// The component is first added to the page
}
componentDidUpdate(prevProps, prevState) {
// The component is updated on the page
}
componentWillUnmount() {
// The component is removed from the page
}
render() {
// render React elements
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment