Skip to content
On this page

Multiple App Instances

Just as Vue supports multi-app instances, so does Harlem. By default Harlem automatically creates a single global instance and exports it from the core package:

typescript
import {
    on,
    off,
    once,
    createStore,
    createVuePlugin,
} from 'harlem';

However, if you have multiple Vue apps running at the same time you can create more instances of Harlem using the createInstance method:

typescript
import {
    createInstance
} from 'harlem';

export const {
    on,
    off,
    once,
    createStore,
    createVuePlugin,
} = createInstance();

MIT Licensed