-
Notifications
You must be signed in to change notification settings - Fork 238
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
docs: use ssrPrefetch in data guide #214
Conversation
docs/guide/data.md
Outdated
}, | ||
|
||
mounted () { | ||
this.fooInc() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not checking here also if this.fooCount
is not set @Akryum ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, and more improvements ✔️
store.replaceState(window.__INITIAL_STATE__) | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it's a good idea removing the whole client data-fetching part here, as they still address some problems that are not completely solved by ssrPrefetch
, e.g. triggering fetches on route change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this data-prefetching part is still outdated, because it can't prefetch non-route components.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I mean we need something to replace it
* 2.6: serverCacheKey bail out * 2.6: api additions * docs: use ssrPrefetch in data guide (#214) * 2.6: serverPrefetch updates
Reworked the data prefetching guide to use
ssrPrefetch
and removed all the now unnecessary boilerplate code.Related feature PR in core: vuejs/vue#9017