Skip to content

Instantly share code, notes, and snippets.

@ezekielchentnik
Created July 8, 2019 00:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ezekielchentnik/b7daafb17a73dbcb437ee825d5a64a48 to your computer and use it in GitHub Desktop.
Save ezekielchentnik/b7daafb17a73dbcb437ee825d5a64a48 to your computer and use it in GitHub Desktop.
export class Static extends React.Component {
shouldComponentUpdate() {
return false;
}
render() {
var child = this.props.children;
if (child === null || child === false) {
return null;
}
return React.Children.only(child);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment