lbc-wrapper v2.0.0
LB-COMPONENT-WRAPPER
1.0.0 is developed via TypeScript
公共组件的包装层,现在是包装antd
yarn add lbc-wrapper # npm install
因为antd
在很多时候并没有写bashouldComponentUpdate
,所以导致性能不高。
通过包装层,添加bashouldComponentUpdate
实现,减少不必要的渲染,提高效率
Example
每一个antd的组件,都通过import ANTD_NAME from 'lbc-wrapper/lib/antd_name'
导入。
如果antd的组件包含子组件,如Select的Option,则需要使用import { Option } from 'lbc-wrapper/lib/select'
来导入
// used to
import { Button, Select, Table } from 'antd'
const { Option } = Select
// right now
import Button from 'lbc-wrapper/lib/button'
import Select, { Option } from 'lbc-wrapper/lib/select'
import Table from 'lbc-wrapper/lib/table'
1.0.11和@types/react@16.7.17正常工作
4 years ago
4 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago