umi-react-native-runtime
TypeScript icon, indicating that this package has built-in type declarations

0.0.4-alpha.1 • Public • Published

umi-react-native-runtime

在 RN 环境下,替换@umijs/runtime

@umijs/runtime中 dynamic 缺省(默认)loading 使用了 HTML p 标签和 br 标签。

当用户启用dynamicImport,并且没有实现自定义的 Loading 组件时,在 RN 中运行会报错,这里做了 Monkey Patch。

另外,@umijs/runtime 导出的是react-router-dom,在 RN 中需要换为:react-router-native

react-router-domreact-router-native大部分组件都导出自react-router,但存在以下差异:

  • react-router-native中没有NavLink组件。
  • react-router-dom中没有BackButtonAndroidBackButton组件。
  • 二者的Link组件是不同的实现。

了解更多详情:README

Readme

Keywords

Package Sidebar

Install

npm i umi-react-native-runtime

Weekly Downloads

1

Version

0.0.4-alpha.1

License

MIT

Unpacked Size

6.9 kB

Total Files

7

Last publish

Collaborators

  • xuyuanxiang