Is there a way to get SSR prefetch data as JSON when route is changed? #9477
Unanswered
a-salimkhanov
asked this question in
CLI - SSR mode
Replies: 1 comment 5 replies
-
|
@a-salimkhanov Can't you make use of vue-router navigation guards? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I get data via
axiosinprefetch.Everything is fine when user loads the whole page. But when
router-linkis clicked, the request to API takes place on client side.Is there an alternative to Next JS
getStaticPropsthat downloads JSON file with needed data of the next page when the router is changed?And it would be great if this JSON file is cached on server. So that a request is not repeated if the page or JSON file has been generated before
Beta Was this translation helpful? Give feedback.
All reactions