Skip to content

@sqlrooms/duckdb / useStoreWithDuckDb

Function: useStoreWithDuckDb()

useStoreWithDuckDb<T>(selector): T

Internal

Select values from the room store that includes the DuckDB slice.

This is a typed wrapper around useBaseRoomStore that narrows the state to RoomStateWithDuckDb so selectors can access db safely.

Type Parameters

Type ParameterDescription
TThe selected slice of state returned by the selector

Parameters

ParameterTypeDescription
selector(state) => TFunction that selects a value from the store state

Returns

T

The selected value of type T