UNPKG

827 BTypeScriptView Raw
1import { ComponentType } from 'react'
2import { StandardProps } from './common'
3
4interface CustomWrapperProps extends StandardProps {
5}
6
7/** custom-wrapper 自定义组件包裹器
8 * 当数据更新层级较深时,可用此组件将需要更新的区域包裹起来,这样更新层级将大大减少
9 * @supported weapp, swan, alipay, tt, jd, qq
10 * @example
11 * ```tsx
12 * import { Component } from 'react'
13 * import { CustomWrapper, View, Text } from '@tarojs/components'
14 *
15 * export default class C extends Component {
16 * render () {
17 * return (
18 * <View>
19 * <CustomWrapper>
20 * <Text>Hello, world!</Text>
21 * </CustomWrapper>
22 * </View>
23 * )
24 * }
25 * }
26 * ```
27 */
28declare const CustomWrapper: ComponentType<CustomWrapperProps>
29
30export { CustomWrapper, CustomWrapperProps }
\No newline at end of file