enableExternalSource
Registers an adapter that lets Solid track reads from a non-Solid reactive system, such as MobX or Vue reactivity, inside its computations.
Import
import { enableExternalSource } from "solid-js";Type signature
function enableExternalSource(config: ExternalSourceConfig): void;Parameters
config
- Type:
ExternalSourceConfig
Learn more
Related types
ExternalSource
interface ExternalSource { track: (prev: any) => any; dispose: () => void;}track
- Type:
(prev: any) => any
dispose
- Type:
() => void
ExternalSourceConfig
interface ExternalSourceConfig { factory: ExternalSourceFactory; untrack?: <T>(fn: () => T) => T;}factory
- Type:
ExternalSourceFactory
untrack
- Type:
<T>(fn: () => T) => T
ExternalSourceFactory
type ExternalSourceFactory = ( fn: (prev: any) => any, trigger: () => void) => ExternalSource;