diff --git a/packages/@react-facet/core/src/components/Map.tsx b/packages/@react-facet/core/src/components/Map.tsx index a6924558..5c326bc7 100644 --- a/packages/@react-facet/core/src/components/Map.tsx +++ b/packages/@react-facet/core/src/components/Map.tsx @@ -4,7 +4,7 @@ import { EqualityCheck, Facet, NO_VALUE } from '../types' export type MapProps = { array: Facet - children: (item: Facet, index: number) => ReactElement + children: (item: Facet, index: number) => ReactElement | null equalityCheck?: EqualityCheck } @@ -35,7 +35,7 @@ export const Map = ({ array, children, equalityCheck }: MapProps) => { type MapChildMemoProps = { arrayFacet: Facet index: number - children: (item: Facet, index: number) => ReactElement + children: (item: Facet, index: number) => ReactElement | null equalityCheck: EqualityCheck } @@ -55,7 +55,7 @@ const MapChildMemo = ({ arrayFacet, index, children, equalityCheck }: MapChi type MapChildProps = { arrayFacet: Facet index: number - children: (item: Facet, index: number) => ReactElement + children: (item: Facet, index: number) => ReactElement | null } const MapChild = ({ arrayFacet, index, children }: MapChildProps) => { diff --git a/packages/@react-facet/core/src/components/Mount.tsx b/packages/@react-facet/core/src/components/Mount.tsx index e72e9f68..84087174 100644 --- a/packages/@react-facet/core/src/components/Mount.tsx +++ b/packages/@react-facet/core/src/components/Mount.tsx @@ -4,7 +4,7 @@ import { Facet } from '../types' type MountProps = { when: Facet - children: ReactElement + children: ReactElement | null condition?: boolean } diff --git a/packages/@react-facet/core/src/components/With.tsx b/packages/@react-facet/core/src/components/With.tsx index 2c0c2f06..1c0b5a94 100644 --- a/packages/@react-facet/core/src/components/With.tsx +++ b/packages/@react-facet/core/src/components/With.tsx @@ -4,7 +4,7 @@ import { Facet, NoValue } from '../types' type WithProps = { data: Facet - children: (data: Facet) => ReactElement + children: (data: Facet) => ReactElement | null } const hasData = (_: Facet, shouldRender: boolean | NoValue): _ is Facet => {