node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org ยป

slap-react-native-icon-button

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>
    );
  }
}