PsyTask | API Docs
    Preparing search index...

    Function createComponentAdapter

    • Adapte third-part reactive systems

      Parameters

      • reactive: <T extends LooseObject>(obj: T) => T

      Returns ComponentAdapter

      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);