The Plugin provides a general scope which needs for read and update effector’s stores, call effector’s events. Required for SSR.
Plugins
EffectorScopePlugin({ scope, scopeName })
Arguments
scopeScopescopeName?custom scopeName (default:root)
Imports
On Vue 3 import the plugin from effector-vue/composition, next to the other composition API methods:
import { EffectorScopePlugin } from "effector-vue/composition";The root entry effector-vue also exports the plugin and keeps doing so for backward compatibility. It is the entry of the Vue 2 API (VueEffector, createComponent), so a Vue 3 app that imports from it pulls in code it never runs.
Examples
Basic Usage
import { createSSRApp } from "vue";import { EffectorScopePlugin } from "effector-vue/composition";import { fork } from "effector";
const app = createSSRApp(AppComponent);const scope = fork();
app.use( EffectorScopePlugin({ scope, scopeName: "app-scope-name", }),);