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

how to pass data to routes before generate #189

Open
flapili opened this issue Mar 17, 2022 · 2 comments
Open

how to pass data to routes before generate #189

flapili opened this issue Mar 17, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@flapili
Copy link

flapili commented Mar 17, 2022

Hi, I would like to switch nuxt2 -> quasar2 but I need SSG, we have hundred of routes to generates and we would know how to avoid spam the api (we need only 1 call to generate every pages)

With nuxt we use payload, how could we achieve the same with quasar + your ext ?

@freddy38510
Copy link
Owner

Hi,

I plan to implement this feature, but right now I'm working on adding lazy/partial hydration to the extension. If you don't need interactions on components that hold your api's data, you might find it useful to not hydrate them on the client side.

Until then one of the solutions I can think of is to retrieve the data from the api and store it in json files before building the app with the hook "beforeBuild".
In this way it is possible to directly import the json files into your components instead of retrieving them via the api.

The crawler feature can take care of your dynamic routes based on your API data (routes with product id for example).

@freddy38510 freddy38510 added the enhancement New feature or request label Apr 5, 2022
@ting-dev-coder
Copy link

Hi, @freddy38510
I need to get route for my meta setting, for example en/xxxx so I could use useMeta to switch meta tags based on different languages. Is it possible to get the route in SSG mode, or would the best way to do this be in SSR mode?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants