UNPKG

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