Skip to content

useFacts

useFacts(options?): UseFactsResult

Defined in: react/src/facts.tsx:113

The stated facts for a campaign, a surface or named products, as data. It renders nothing and holds nothing: while the request runs facts is null, ok is false and reason is undefined. Markup you render from it is yours, and so is its layout: give it a fixed space, or render it only where text appearing later cannot move the page. For text in the page flow, use <Fact>, which reserves its space.

The request runs in the browser after mount (never on the server) and again when the options change; it never rejects.

UseFactsOptions = {}

UseFactsResult