Guard API
These docs are auto-generated from typings files (
*.d.ts
).
Guard
The Guard component takes in a fetch instance and a render prop. This component calls your render prop with data when the data becomes available effectively guarding you against nullish data.
declare function Guard(props: Props): JSX.Element;
Props
Guard Name | Description | Type | Required |
---|---|---|---|
fetch | the fetch | FetchInstance | yes |
children | a render prop that is invoked when there is data available. | (data: Data) => JSX.Element | yes |