无法在React本机默认项目中将类作为函数调用

时间:2018-12-10 09:15:43

标签: react-native

我刚刚安装了本机默认项目,并在默认类中添加了一个函数,但没有得到执行

drawerController.configureDrawer(drawerContainerView: self.rolePageDrawerView, overlaidView: self.rolePageContentView)

1 个答案:

答案 0 :(得分:0)

React-Native中警报的正确方法是:

Alert.alert(
  'Alert Title',
  'My Alert Msg',
  [        
    {text: 'Cancel', onPress: () => console.log('Cancel Pressed'), style: 'cancel'},
    {text: 'OK', onPress: () => console.log('OK Pressed')},
  ],
  { cancelable: false }
)

谢谢..!

〜Praz