Skip to content

registerModule would be better to called in beforeCreate instead of asyncData #166

Open
@JounQin

Description

@JounQin

@yyx990803 When we are using SSR, client will not call asyncData at first render, then we will not be able to use registered store module because it has not been registered on client.

So, if it is as expected, registerModule would be better to called in beforeCreate instead of asyncData, so that it will be registered on client at first render, of course preserveState: process.env.VUE_ENV !== 'server' should also be used.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions