Skip to content

Commit a090c62

Browse files
ktsnyyx990803
authored andcommitted
mention how to avoid stateful singletons in SSR clearer (#809)
1 parent e71a2d3 commit a090c62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/en/modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ You can also remove a dynamically registered module with `store.unregisterModule
248248

249249
Sometimes we may need to create multiple instances of a module, for example:
250250

251-
- Creating multiple stores that uses the same module;
251+
- Creating multiple stores that uses the same module (e.g. To [avoid stateful singletons in the SSR](https://ssr.vuejs.org/en/structure.html#avoid-stateful-singletons) when the `runInNewContext` option is `false` or `'once'`);
252252
- Register the same module multiple times in the same store.
253253

254254
If we use a plain object to declare the state of the module, then that state object will be shared by reference and cause cross store/module state pollution when it's mutated.

0 commit comments

Comments
 (0)