Documents / @faasjs/react / OptionalWrapperProps
Type Alias: OptionalWrapperProps<TWrapper>
OptionalWrapperProps<
TWrapper> =object
Props for the OptionalWrapper helper component.
Type Parameters
TWrapper
TWrapper extends ComponentType<{ children: ReactNode; }> = any
Wrapper component type used when condition is true.
Properties
children
children:
ReactNode
Content rendered directly or inside the wrapper.
condition
condition:
boolean
When true, render children inside Wrapper; otherwise return children unchanged.
Wrapper
Wrapper:
TWrapper
Wrapper component used only when condition passes.
wrapperProps?
optionalwrapperProps?:ComponentProps<TWrapper>
Props forwarded to Wrapper together with children when condition is true.