Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
svihpinc opened this issue Dec 29, 2022 · 0 comments
Open

Comments

@svihpinc
Copy link

svihpinc commented Dec 29, 2022

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?

@svihpinc svihpinc changed the title Add example for update lifecycle updating parcel componentprops Add example for update lifecycle updating parcel component's props Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant