slap-react-native
v1.0.25
Published
``` $ npm install $ npm install -g exp $ exp start ```
Downloads
46
Readme
Bootstrapping
$ npm install
$ npm install -g exp
$ exp start
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>
);
}
}