TinyBase logoTinyBase β

provideStore

The provideStore function registers a Store with a given Id into the current Provider context, making it available to all descendant components.

provideStore(
  storeId: string,
  store: Store,
): void
TypeDescription
storeIdstring

The Id to register the Store under.

storeStore

The Store to register.

returnsvoid

This has no return value.

This function must be called inside a Svelte component's <script> block that is a descendant of a Provider component.

Since

v8.1.0