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

Documentation for client data fetching before route navigation #229

Open
ozguruysal opened this issue Feb 12, 2019 · 1 comment
Open

Documentation for client data fetching before route navigation #229

ozguruysal opened this issue Feb 12, 2019 · 1 comment

Comments

@ozguruysal
Copy link

New serverPrefetch is great to prefetch data on server side but the new documentation doesn't include an example for prefetching data on the client.

@thearabbit
Copy link

I try like this, but don't show any log

<template>
  <div>
    <h1>Home</h1>
  </div>
</template>

<script>
export default {
  name: "Home",
  serverPrefetch() {
    console.log("serverPrefetch");
  },
  mounted() {
    console.log("mounted");
  }
};
</script>

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

No branches or pull requests

2 participants