remobile / react-native-toast

A android like toast for android and ios, android use native toast, ios use UIView+Toast
MIT License
346 stars 143 forks source link

bind方法的第一个参数代表的是什么? #48

Open zhangxiann opened 6 years ago

zhangxiann commented 6 years ago
  1. bind方法的第一个参数代表的是什么?
  2. Toast.show.bind方法为什么在普通的Button中的onPress里面无效,是不是必须要在react-native-toast里面的Button的onPress方法才能显示toast
isaaclem commented 5 years ago

@xiechuanyu

建議參考javascript裡的bind, 是一樣的原理 或者,可以引用ES6的方式

<Button onPress={() => Toast.showLongTop("this is a message")}>
  showLongTop
</Button>