Quasar & Quasar CLI v0.17.1 are out!
-
A small followup of v0.17 release. Fixes some reported issues:
- fix: Weird webpack behavior regarding css files
- fix: Vendor chunk changing filename on every build
- fix(PWA): service-worker.js path for production
- [Bug] .17 - Notify defaults #2322
Enjoy!
-
@rstoenescu I still don’t see how SSR and preFetch documentation is leading me to the correct solution. Here is a call trace showing preFetch calling a store action to read data asynchronously, while that is running the meta, compute, and page renders and empty page, and then the async read completes and updates the store - but the page was already rendered blank.
plugin:firebase
preFetch -LGr4Kbj_q9lf0Gn9JGg
action:readCampaign -LGr4Kbj_q9lf0Gn9JGg
compute:campaign
meta
/campaigns/-LGr4Kbj_q9lf0Gn9JGg -> request took: 205ms . <---- renders blank page
mutation:addCampaign -LGr4Kbj_q9lf0Gn9JGg <— finishes loading data after page was renderedThe documentation at https://github.com/quasarframework/quasar-framework.org/blob/dev/source/guide/app-prefetch-feature.md says
"
preFetch ({ store, currentRoute, previousRoute, redirect, ssrContext }) {
…
// Return a Promise if you are running an async job
// Example:
return store.dispatch(‘fetchItem’, currentRoute.params.id)
"here are my functions:
preFetch ({ store, currentRoute, previousRoute, redirect, ssrContext }) {
console.log(‘preFetch’, currentRoute.params.id)
return store.dispatch(‘db/readCampaign’, currentRoute.params.id)
},export const readCampaign = (context, campaignId) => {
console.log(‘action:readCampaign’, campaignId)
campaignsRef.child(campaignId)
.once(‘value’).then(function (snapshot) {
context.commit(‘addCampaign’, { id: campaignId, data: snapshot.val() })
})
}export const addCampaign = (state, campaign) => {
console.log(‘mutation:addCampaign’, campaign.id)
state.campaigns[campaign.id] = campaign.data
} -
This post is deleted! -
Oh. I forgot to return the promise in the action… Cary on
-
Excited about ,and grateful for the release. Many thanks. Now my dreams are all in TypeScript