メインコンテンツまでスキップ

Maybe

Maybe(props, context?): null | ReactElement<any, any>

条件式がtrueになった場合のみ子要素を出力するコンポーネント

Example

<Maybe test={someCondition}>
<span>hello!</span>
</Maybe>

Parameters​

NameType
propsPropsWithChildren<{ test?: null | boolean }>
context?any

Returns​

null | ReactElement<any, any>