Skip to content

Instantly share code, notes, and snippets.

@mahdiyazdani
Created September 25, 2018 21:59
Show Gist options
  • Save mahdiyazdani/c00966f04392db76afa884fe4f8a6d4d to your computer and use it in GitHub Desktop.
Save mahdiyazdani/c00966f04392db76afa884fe4f8a6d4d to your computer and use it in GitHub Desktop.
componentWillUnmount
import React from 'react';
export class Example extends React.Component {
componentWillUnmount() {
alert('Goodbye world');
}
render() {
return <h1>Hello world</h1>;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment