Skip to content
module@warp-drive/core/reactive

Function instantiateRecord()

ts
function instantiateRecord(
   store, 
   identifier, 
   createArgs?): ReactiveResource;

Defined in: warp-drive-packages/core/src/reactive/-private/hooks.ts:21

The store's default instantiateRecord hook implementation, which produces a ReactiveResource for identifier using the resource schema registered for its type.

createArgs are only applied (via Object.assign) when the resource's schema is legacy, matching the historical behavior of assigning initial properties when creating a new legacy record.

Parameters

store

Store

identifier

ResourceKey

createArgs?

Record<string, unknown>

Returns

ReactiveResource

Released under the MIT License.