Skip to content

Instantly share code, notes, and snippets.

@Dman757
Created November 2, 2017 02:02
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 Dman757/9468db39954c0ac7b07f570a5685101f to your computer and use it in GitHub Desktop.
Save Dman757/9468db39954c0ac7b07f570a5685101f to your computer and use it in GitHub Desktop.
class whatever extends Component {
buttonRender () {
if (this.props.saveDisabled) {
return <Button1/>
} else {
return <Button2/>
}
}
render () {
return (
{ this.buttonRender() }
)
}
}
export default whatever
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment