TinyBase logoTinyBase

ProviderProps

ProviderProps props are used with the Provider component, so that Store Metrics, Indexes, Relationships, Queries, and Checkpoints objects can be passed into the context of an application and used throughout.

{
  store?: Store;
  storesById?: {[storeId: Id]: Store};
  metrics?: Metrics;
  metricsById?: {[metricsId: Id]: Metrics};
  indexes?: Indexes;
  indexesById?: {[indexesId: Id]: Indexes};
  relationships?: Relationships;
  relationshipsById?: {[relationshipsId: Id]: Relationships};
  queries?: Queries;
  queriesById?: {[queriesId: Id]: Queries};
  checkpoints?: Checkpoints;
  checkpointsById?: {[checkpointsId: Id]: Checkpoints};
  persister?: AnyPersister;
  persistersById?: {[persisterId: Id]: AnyPersister};
  synchronizer?: Synchronizer;
  synchronizersById?: {[synchronizerId: Id]: Synchronizer};
}
TypeDescription
store?Store

A default single Store object that will be available within the Provider context.

storesById?{[storeId: Id]: Store}

An object containing multiple Store objects that will be available within the Provider context by their Id.

metrics?Metrics

A default single Metrics object that will be available within the Provider context.

metricsById?{[metricsId: Id]: Metrics}

An object containing multiple Metrics objects that will be available within the Provider context by their Id.

indexes?Indexes

A default single Indexes object that will be available within the Provider context.

indexesById?{[indexesId: Id]: Indexes}

An object containing multiple Indexes objects that will be available within the Provider context by their Id.

relationships?Relationships

A default single Relationships object that will be available within the Provider context.

relationshipsById?{[relationshipsId: Id]: Relationships}

An object containing multiple Relationships objects that will be available within the Provider context by their Id.

queries?Queries

A default single Queries object that will be available within the Provider context, since v2.0.

queriesById?{[queriesId: Id]: Queries}

An object containing multiple Queries objects that will be available within the Provider context by their Id, since v2.0.

checkpoints?Checkpoints

A default single Checkpoints object that will be available within the Provider context.

checkpointsById?{[checkpointsId: Id]: Checkpoints}

An object containing multiple Checkpoints objects that will be available within the Provider context by their Id.

persister?AnyPersister

A default single Persister object that will be available within the Provider context.

persistersById?{[persisterId: Id]: AnyPersister}

An object containing multiple Persister objects that will be available within the Provider context by their Id.

synchronizer?Synchronizer

A default single Synchronizer object that will be available within the Provider context.

synchronizersById?{[synchronizerId: Id]: Synchronizer}

An object containing multiple Synchronizer objects that will be available within the Provider context by their Id.

One of each type of object can be provided as a default within the context. Additionally, multiple of each type of object can be provided in an Id-keyed map to the ___ById props.

Since

v1.0.0