Score
0
Watch 1 Star 3 Fork 0

fattypanda / react-dynamicJavaScript

Join us
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
异步加载 React 组件 umi/dynamic 的单独提出版,方便在其它非 umi 框架中使用 spread retract

Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

react-dynamic

项目介绍

异步加载 React 组件 umi/dynamic 的单独提出版,方便在其它非 umi 框架中使用

软件架构

适用于所有 React 组件(应该吧 >_> )

安装教程

yarn add react-dynamic

或者

npm i -S react-dynamic

使用说明

1.基础示例

import dynamic from 'react-dynamic';

export default dynamic(import('./component/example'));

2.组件还未载入的设置

import dynamic from 'react-dynamic';
import Loading from './component/loading';

export default dynamic(import('./component/example'), {
  loading: <Loading />
});

参与贡献

  1. Fork 本项目
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request

Comments ( 0 )

Sign in for post a comment

JavaScript
1
https://gitee.com/fattypanda_958/react-dynamic.git
git@gitee.com:fattypanda_958/react-dynamic.git
fattypanda_958
react-dynamic
react-dynamic
master

Help Search