Skip to content
API/<MemoryAdapter>

<MemoryAdapter>

component
src/components/memory-adapter.tsx1 parameter

Keep the query of every list below it in memory instead of the URL, and share it between them — the filters, the table and the pager of a list in a dialog.

The state lives in the provider: it starts from initialSearch and is gone when the provider unmounts. There is no history, so replace makes no difference and there is no Back. Nesting scopes a subtree: the nearest adapter provider wins. For a list that one component drives alone, useMemoryAdapter needs no provider.

import { MemoryAdapter } from '@qubeejs/react';
function MemoryAdapter(props: MemoryAdapterProps): ReactElement
Parameter Type Description
props MemoryAdapterProps The subtree, and the query to start from

The subtree, with the adapter in context

<MemoryAdapter initialSearch="status=draft">
<TagFilters />
<TagTable />
</MemoryAdapter>

MemoryAdapterProps