Skip to Content
BBRICKSv0.7.4
DataHelpers

Helpers and constants

Functions, constants and classes that have no page of their own.

Functions, constants and classes exported from @ergasti/bricks that have no page of their own. Components and hooks each have a page.

EMPTY_PARAM

constant

A patch value that writes the param with an empty value (?ns.status=), where '' would drop it: what a field set to '' against a non-empty default writes, so the empty choice survives a reload, Back and a shared link.

const EMPTY_PARAM: typeof EMPTY_PARAM

Source: src/data/urlState.ts (line 25)

fetchJson

function deprecated

Deprecated

useDrawerResource now reads through the DataProvider's HttpClient (CSRF, base URL, onUnauthorized, the server's message); pass fetcher only for a special case. fetchJson is removed in 1.0.0.

GET a JSON url. A non-2xx answer throws its status, so the caller can show the right message.

function fetchJson<T>(url: string, signal: AbortSignal): Promise<T>

Prop

Type

Source: src/hooks/useDrawerResource.ts (line 25)

On this page