Repository navigation
Conversation
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://feat-vue-app-setup-void-cloud.voidzero-docs.workers.dev (commit 46f9707)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
bd6b377 to
6955086
Compare
6955086 to
283b5b3
Compare
pages/_app.ts setup hook for Vue pluginspages/_app setup hook for Vue, React, Svelte, and Solid
pages/_app setup hook for Vue, React, Svelte, and Solid
pages/_app setup hook for Vue, React, Svelte, and Solid
cpojer
left a comment
There was a problem hiding this comment.
I don't think we need this for every adapter, the others can already handle this via root layouts. Can we scope this to vue only through an opt-in like voidVue({ appSetup: './src/vue-app.ts' }).
283b5b3 to
4e71677
Compare
pages/_app setup hook for Vue, React, Svelte, and SolidappSetup option for installing Vue plugins
|
Scoped it to Vue, opted in with |
cpojer
left a comment
There was a problem hiding this comment.
Still two issues:
- This change captures app state after deferred callbacks finish, which invalidates initial HTML. This would wipe away text a user has typed into when the rest of the page loads.
- Islands can change the shared server store after an earlier island has already rendered and also erases user input. We should defer island state transfer until each island can hydrate with the state it rendered from.
4e71677 to
46f9707
Compare
|
Both fixed.
Both cases have browser tests now. An island that reads store state changed on the server still mismatches, and the docs now say so. |
Vue Pages has no place to install Vue plugins such as Pinia and vue-i18n.
voidVue({ appSetup: './src/vue-app.ts' })now names a module whose default export Void calls with every Vue app it creates: once per request on the server, and in the browser once for the page and once per island.Void calls
dehydrate()as soon as the page renders, before deferred data, and passes the result tohydrate()before the page mounts in the browser.Islands start from the state their own setup creates, so server data reaches them as props.
Setup must be synchronous.
Fixes #915