[ssr] Work around the asyncData <> created hook issue
See original GitHub issueCurrently 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:
- Created 6 years ago
- Comments:10 (9 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
Closing this, as there is not much actionable here for now.