TinyBase logoTinyBase β

Inspector

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

The props passed to the component.

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

See the <Inspector /> (Svelte) demo for this component in action.

The component displays a nub in the corner of the screen which you may then click to interact with all the Store objects in the Provider component context.

The component's props identify the nub's initial location and panel state, though subsequent user changes to that will be preserved on each reload.

Example

This example imports the Inspector component from the module.

import {Inspector} from 'tinybase/ui-svelte-inspector';

console.log(typeof Inspector);
// -> 'function'

Since

v8.2.0