TinyBase logoTinyBase β

Provider

Provider(
  this: void,
  internals: Brand<"ComponentInternals">,
  props: ProviderProps,
): {
  $on?: (type: string, callback: (e: any) => void): () => void;
  $set?: (props: Partial<ProviderProps>): void;
}
TypeDescription
thisvoid
internalsBrand<"ComponentInternals">
propsProviderProps

The props passed to the component.

returns{ $on?: (type: string, callback: (e: any) => void): () => void; $set?: (props: Partial<ProviderProps>): void; }

Store objects, Metrics, Indexes, Relationships, Queries, Checkpoints, Persisters, and Synchronizers can all be provided both as single defaults and as named instances in a *ById map.

Example

This example creates a Provider context with a default Store.

// In a .svelte file:
// <Provider store={createStore()}>
//   <App />
// </Provider>

Since

v8.1.0

element

The custom element version of the component. Only present if compiled with the customElement compiler option Read more.

z_$$bindings

Does not exist at runtime, for typing capabilities only. DO NOT USE Read more.