tagged
The tagged(...tags)(Component, [options])
HoC attaches tags to the component and its child components.
Conditional Bindings are detailed in Conditional Bindings section of the documentation.
#
Arguments#
tagged(...tags)...tags
:Tag[]
โ tags to be attached to the component.
#
tagged(...tags)(Component, [isolated])Component
:React.ComponentType
โ component to be wrapped.[options]
:TaggedOptions
isolated
:boolean
โ by default, the wrapped component and its child components inherit tags from from the upstream tagged components. You can useisolated
option to disable this behavior.
#
ReturnsReact.ComponentType
โ the wrapped component.
#
Exampletags.ts
index.tsx
UserComponent.tsx
SettingsComponent.tsx