-
Notifications
You must be signed in to change notification settings - Fork 27
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
Sub App only works first time #46
Comments
After investigation: renderNuxt function in client.js only gets called on first render. If you unmount/unload/unregister the application and then attempt to register / remount the app without a full page reload then renderNuxt() does not get called. In the mfe.js a workaround is to adapt it to the following so you are manually calling the render function except on the first page load:
Note: You must use the singleSpa unregisterApplication on your application when you change routes or want to "unmount" the app, and then reregister it again with registerApplication when you return back to the page for this to work |
well, thanks for your feedback. our members might reply in their spare time. |
Is HMR works for you when edit a file into a subapp? |
Describe the bug
When importing a SubApp it only works the first time it loads. If I navigate away from the SubApp page and come back then it no longer mounts / displays.
Here is a repo to demo the behaviour: https://github.com/Reiss-Cashmore/nuxt-single-spa-bug
Screenshots
Bug.mp4
To Reproduce
Steps to reproduce the behavior:
I've noticed that the SubApp unmount() and beforeUnmount() in MFE.js do not get called for some reason??
environment information
The text was updated successfully, but these errors were encountered: