Optional
options: { const NewComponent = withWrapper(Wrapper)(Component)
<NewComponent a="a" b="b" c="c" />
// is equivalent to
<Wrapper> // by default, it does not bring any prop
<Component a="a" b="b" c="c" />
</Wrapper>
const NewComponent = withWrapper(Wrapper, { pickProps: ['a', 'b'] })(Component)
<NewComponent a="a" b="b" c="c" />
// is equivalent to
<Wrapper a="a" b="b">
<Component a="a" b="b" c="c" />
</Wrapper>
const NewComponent = withWrapper(Wrapper, { omitProps: ['a', 'b'] })(Component)
<NewComponent a="a" b="b" c="c" />
// is equivalent to
<Wrapper c="c">
<Component a="a" b="b" c="c" />
</Wrapper>
// to carry all props, use omitProps with empty array
const NewComponent = withWrapper(Wrapper, { omitProps: [] })(Component)
<NewComponent a="a" b="b" c="c" />
// is equivalent to
<Wrapper a="a" b="b" c="c">
<Component a="a" b="b" c="c" />
</Wrapper>
Generated using TypeDoc
Wraps the component with the provided Component Wrapper