Nondeterministic Polynomial Munchies
Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

slap-react-native-toggle

1.0.4 • Public • Published

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

Keywords

none

Install

npm i [email protected]

Version

1.0.4

License

none

Last publish

Collaborators

  • avatar