mobxjs / mobx-vue-lite

Lightweight Vue 3 bindings for MobX based on Composition API.
MIT License
69 stars 3 forks source link

Is `enableStaticRendering` needed when used on vercel? #129

Closed xieyuheng closed 1 year ago

xieyuheng commented 2 years ago

Like the enableStaticRendering of mobx-react-lite:

import { enableStaticRendering } from "mobx-react-lite"

enableStaticRendering(isServer())
xieyuheng commented 2 years ago

In mobx-react-lite there is a note about SSR environment:

Call enableStaticRendering(true) when running in an SSR environment, in which observer wrapped components should never re-render, but cleanup after the first rendering automatically. Use isUsingStaticRendering() to inspect the current setting.

Do we need to worry about this when using mobx-vue-lite?

If not, why?

(I am new to mobx, want to learn more about this.)

iChenLei commented 2 years ago

cc @wobsoriano