Skip to content

Instantly share code, notes, and snippets.

@samueljmurray
Created August 30, 2017 15:58
Show Gist options
  • Save samueljmurray/bf44797ecef0391e0f1338e470d4f22b to your computer and use it in GitHub Desktop.
Save samueljmurray/bf44797ecef0391e0f1338e470d4f22b to your computer and use it in GitHub Desktop.
Button component - with function
/* Button.js */
import styles from "buttonStyles";
class Button extends React.Component {
render() {
const contextualStyles = styles(this.props);
return (
<View style={contextualStyles.button}>
// ...
</View>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment