Created
September 25, 2018 21:51
-
-
Save mahdiyazdani/abe6f204c92e5f4f1ba01321385221bf to your computer and use it in GitHub Desktop.
componentWillUpdate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
export class Example extends React.Component { | |
componentWillUpdate(nextProps, nextState) { | |
alert('Component is about to update! Any second now!'); | |
} | |
render() { | |
return <h1>Hello world</h1>; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment