PsyTask | API Docs
    Preparing search index...

    Variable createComponentAdapterConst

    createComponentAdapter: (
        reactive: <T extends LooseObject>(obj: T) => T,
    ) => ComponentAdapter

    Adapte third-part reactive systems

    Type Declaration

    With Vue

    import { shallowReactive, effect } from '@vue/reactivity';
    const adapter = createComponentAdapter(shallowReactive);
    const VueComponent = (props: { text: string }) => {
    const node = document.createElement('div');
    effect(() => (node.textContent = props.text));
    return node;
    };
    const Component = adapter.mark(VueComponent);