Skip to content

Instantly share code, notes, and snippets.

View MurylloEx's full-sized avatar
💨
Studying

Muryllo Pimenta MurylloEx

💨
Studying
View GitHub Profile
@MurylloEx
MurylloEx / If.tsx
Last active October 17, 2024 14:02
[React] If Conditional Render
import { Fragment, FunctionComponent, ReactElement, useCallback } from 'react';
import { IfElse } from './IfElse';
import { IfThen } from './IfThen';
import { IfElseIf } from './IfElseIf';
type CompoundComponent<T, K> = FunctionComponent<T> & K;
type IfThenType = typeof IfThen;
type IfElseType = typeof IfElse;
type IfElseIfType = typeof IfElseIf;