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]:TaggedOptionsisolated:booleanโ by default, the wrapped component and its child components inherit tags from from the upstream tagged components. You can useisolatedoption to disable this behavior.
Returns#
React.ComponentType โ the wrapped component.
Example#
tags.ts
index.tsx
UserComponent.tsx
SettingsComponent.tsx