useInternalRenderer
export
function
useInternalRenderer
<
 Â
T
extends
TagName
>
(
 Â
tagName
:
T
,
 Â
props
:
InternalRendererProps
<
any
>
)
:
InternalRendererConfig
<
ReturnType
<
typeof
specialRenderersConfig
[
T
]
[
"hook"
]
>
>
|
InternalRendererConfig
<
TDefaultRendererProps
<
any
>
>
Resuse internal renderers logic for infinite customization!
Remarks
tagName
must be invariant, i.e. it cannot change. You would
otherwise break the rules of hooks.
#
Type ParametersT
#
The name of the tag to target.
#
ParameterstagName
#
required
tagName
:
T
;
Invariant The tag name to extend.
props
#
required
The props passed to the custom renderer.
#
ReturnsAn object with two fields: Renderer
(the internal react
component) and rendererProps
, the internal component props.