Function: createSolidSignalBridge

solid.createSolidSignalBridge

createSolidSignalBridge<T>(target): () => T

Bridges a @banksia/signals reactive object or domain store into SolidJS's fine-grained reactivity system.

Type parameters

Name Type Description
T extends object The type of reactive target object or store.

Parameters

Name Type Description
target T The reactive domain store or proxy object to bridge into SolidJS.

Returns

fn

An accessor getter function returning the target object for use in SolidJS components.

(): T

Returns

T

Remarks

Wraps the reactive proxy target inside a SolidJS signal accessor. When any tracked property on the target mutates, the SolidJS signal is triggered, causing dependent SolidJS computations and JSX components to update. Cleanup is managed automatically when the enclosing SolidJS reactive root or component is unmounted.

Example

import { createSolidSignalBridge } from '@banksia/signals/solid';
import { counterStore } from './counter-store';

export function CounterView() {
  const store = createSolidSignalBridge(counterStore);
  return <div>Count: {store().count}</div>;
}