question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ssr] Work around the asyncData <> created hook issue

See original GitHub issue

Currently some components need to change the state of the store before the first query. The asyncData method pattern does not work in that case unless you manually register the facets and everything again.

We need to find a way to not have to duplicate that information. Remove the current declarative components is of course not an option.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
rayrutjescommented, Aug 8, 2017

We currently have the same design. The only difference beeing that the only place the store is aware of the existing components is in the actual template.

I’ll put more thoughts into it but I think for now duplicating some of the initializing option makes sense.

0reactions
rayrutjescommented, Oct 17, 2017

Closing this, as there is not much actionable here for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VueJS - SSR - Wait for async data in created() hook before ...
Logging showed the problem is created() does not wait for my axios data call to end wheter I use async/await, then() or a...
Read more >
Data Fetching - Nuxt
We can use the fetch method or the asyncData method. ... Nuxt has two hooks for asynchronous data loading: asyncData . This hook...
Read more >
SSR asyncData fetching after components were created
The issue we face is that when doing server side rendering, async data has to be fetched before the rendering phase begins. And...
Read more >
Understanding Difference Between Asyncdata Fetch Nuxt
You can get around this last limitation by either: 1️⃣ Fetching your data in the mounted hook, but you lose server-side rendering. 2️⃣...
Read more >
`usePromise`: A React hook for async data loading with server ...
React hooks can help build components made up of re-usable smaller helpers ... compose a new hook for async data loading (with SSR...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found