您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

openURLInBrowser.native.js 367B

1234567891011121314151617
  1. // @flow
  2. import { Linking } from 'react-native';
  3. import logger from './logger';
  4. /**
  5. * Opens URL in the browser.
  6. *
  7. * @param {string} url - The URL to be opened.
  8. * @returns {void}
  9. */
  10. export function openURLInBrowser(url: string) {
  11. Linking.openURL(url).catch(error => {
  12. logger.error(`An error occurred while trying to open ${url}`, error);
  13. });
  14. }