No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Quasar & Quasar CLI v0.17.1 are out!

    Announcements
    3
    5
    938
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • rstoenescu
      rstoenescu Admin last edited by

      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!

      1 Reply Last reply Reply Quote 0
      • M
        mbrandeis last edited by mbrandeis

        @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 rendered

        The 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
        }

        M 1 Reply Last reply Reply Quote 0
        • M
          mbrandeis @mbrandeis last edited by mbrandeis

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • M
            mbrandeis last edited by

            Oh. I forgot to return the promise in the action… Cary on

            1 Reply Last reply Reply Quote 0
            • A
              aryeh last edited by aryeh

              Excited about ,and grateful for the release. Many thanks. Now my dreams are all in TypeScript 🙂

              1 Reply Last reply Reply Quote 0
              • First post
                Last post