TinyBase logoTinyBase

ValuesProps

ValuesProps props are used for components that refer to all the Values in a Store, such as the ValuesView component.

{
  store?: StoreOrStoreId;
  valueComponent?: ComponentType<ValueProps>;
  getValueComponentProps?: (valueId: Id) => ExtraProps;
  separator?: ReactElement | string;
  debugIds?: boolean;
}
TypeDescription
store?StoreOrStoreId

The Store to be accessed: omit for the default context Store, provide an Id for a named context Store, or provide an explicit reference.

valueComponent?ComponentType<ValueProps>

A custom component for rendering each Value in the Store (to override the default ValueView component).

getValueComponentProps?(valueId: Id) => ExtraProps

A function for generating extra props for each custom Value component based on its Id.

separator?ReactElement | string

A component or string to separate each Value component.

debugIds?boolean

Whether the component should also render the Ids of each Value to assist with debugging.

Since

v3.0.0