Skip to content

Add example for update lifecycle updating parcel component's props #54

Description

@svihpinc

An example of how to handle passing props to parcel component when single-spa update lifecycle is triggered with new props would be great.

I'm passing the custom props to vue component like this:

import Vue from 'vue';
import singleSpaVue from 'single-spa-vue';
import App from '@/App.vue';

Vue.config.productionTip = false;

const vueLifecycles = singleSpaVue({
	Vue,
	async appOptions(props) {
		return render(h) {
			return h(App, {props});
		}
	},
});

export const { bootstrap, mount, unmount } = vueLifecycles;
export async function update(props) {
  // how to update props in render??
}

I need the props being passed to App to update, so that App is rerendered. How do I do that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions