ToastExample.js 496 B

12345678910111213
  1. // ToastExample.js
  2. /**
  3. * This exposes the native ToastExample module as a JS module. This has a
  4. * function 'show' which takes the following parameters:
  5. *
  6. * 1. String message: A string with the text to toast
  7. * 2. int duration: The duration of the toast. May be ToastExample.SHORT or
  8. * ToastExample.LONG
  9. */
  10. import {NativeModules} from 'react-native';
  11. // 下一句中的ToastExample即对应上文
  12. // public String getName()中返回的字符串
  13. export default NativeModules.ToastExample;