Skip to content

Mistmatch between CSR & SSR multiplies Vue's instances x2 #3922

@Fifciu

Description

@Fifciu

In one of my modules I am using AsyncDataLoader to fetch some stuff inside module's afterRegistration hook. I've tried to just use await inside async afterRegistration but with that I could not get SSR.

That's source code of that file: https://github.com/vue-wordpress/vsf-wp-json/blob/master/hooks/afterRegistration.ts

I am using repo from master branch. It is 1.10.5. With that my nodes are being multiplied. Check this:
image

After commenting:

AsyncDataLoader.push({
      async execute ({ route, store, context }) {
        await vuex.loadBase(store.dispatch, true);
      }
    })

Inside module. I have proper instances, no multiplied.

I am going to investigate AsyncDataLoader in core and try to fix it. Do you have any ideas/tips?

Metadata

Metadata

Assignees

Labels

P3: NormalPriority mark - normal prioritybugBug reports

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions