slap-react-native-button
v3.0.11
Published
``` $ npm install $ react-native run-android $ react-native run-ios ```
Downloads
11
Readme
bootstrap
$ npm install
$ react-native run-android
$ react-native run-ios
test
npm test
component style guide
export default class MyComponent extends Compoent {
static propTypes = {
text: PropTypes.string
};
static defaultProps = {
text: 'text'
};
state = {
clickNumber: 0
};
animatedValue = new Animated.Value(0);
componentDidMount() {
}
onPress = () => {
this.setState((previousState) => {
return {
clickNumber: previousState.clickNumber + 1
};
});
};
render() {
return (
<View>
<Text onPress={this.onPress}>{ this.props.text }</Text>
</View>
);
}
}