📜  如何添加按钮反应原生 app.js - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:05.490000             🧑  作者: Mango

代码示例1
var tapSpeed = React.createClass({
  render: function() {
    return (
      
        
          Tap me as fast as you can!
        
        
        !
        
      
    );
  }
});

var styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#FFCCCC'
  },
  welcome: {
    fontSize: 20,
    textAlign: 'center',
    margin: 10
  },
  button: {
    textAlign: 'center',
    color: '#ffffff',
    marginBottom: 7,
    border: 1px solid blue,
    borderRadius: 2px
  }
});