react-lazily-component
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

react-lazily-component

为React设计的组件懒加载方法,支持jsx和tsx。

downloads install size Version License GitHub repo stars

Issues

使用的时候遇到任何问题或有好的建议,请点击进入issue,欢迎参与维护!

How to use?

首先你需要通过命令行安装:

npm install --save react-lazily-component

安装好了以后,然后引入后就可以使用了:

import ReactLazilyComponent from 'react-lazily-component'
let Demo = ReactLazilyComponent(() => import('./demo.jsx'))

这个Demo就是一个组件,和普通方式引入的组件一样使用即可,不过效果却是懒加载。

开源协议

MIT

Copyright (c) 2021-2022 hai2007 走一步,再走一步。

Dependencies (0)

    Dev Dependencies (8)

    Package Sidebar

    Install

    npm i react-lazily-component

    Weekly Downloads

    4

    Version

    0.3.0

    License

    MIT

    Unpacked Size

    17.7 kB

    Total Files

    13

    Last publish

    Collaborators

    • hai2007