Using Instance API
useRuntimeApp()
Creates a Runtime instance for preview mode.
js
const runtime = useRuntimeApp({ id: 've1' });Notes
- Must be called inside Vue
setup() - Automatically disposes on unmount
- Load schema separately with
runtime.schema(data)
useDesignerApp()
Creates a Runtime instance and attaches runtime.designer.
js
const runtime = useDesignerApp({ id: 'designer-1' });
const designer = runtime.designer;Notes
- Must be called inside Vue
setup() - Automatically mounts designer DnD on
onMounted - Automatically disposes designer and runtime on unmount
Comparison
useRuntimeApp() | useDesignerApp() | |
|---|---|---|
| Use case | Preview | Designer |
| Returns | Runtime | Runtime with .designer |
| DnD | No | Yes |
| History | No | Yes |
Next
For the full instance method list, see Application and Designer Instance.
