如何使用NativeBase组件添加事件

Vis*_*oop 5 react-native native-base

NativeBase组件可以使用哪些事件?

比如说,

  • 更新onChangeText上输入的状态
  • 我想在提交表单时回复按钮点击

NativeBase组件支持React Native中提到的其他事件吗?

Shi*_*nha 11

这应该像在按钮组件上使用onPress方法道具一样简单:

<Button style={{ backgroundColor: 'grey'}} onPress={() =>alert('Add payment')} block >
<Icon name="ios-add-circle-outline" />
ADD PAYMENT
</Button>
Run Code Online (Sandbox Code Playgroud)