Skip to content

Instantly share code, notes, and snippets.

@jahvi
Created August 11, 2019 10:15
Show Gist options
  • Save jahvi/8cfdf847771ab6aaf12614558ade08d2 to your computer and use it in GitHub Desktop.
Save jahvi/8cfdf847771ab6aaf12614558ade08d2 to your computer and use it in GitHub Desktop.
<script>
export default {
async asyncData ({ store, route }) {
// ...
// Prefetch CMS data on the server
await store.dispatch('cmsBlock/list', {
filterValues: ['home_banner'] // Array of CMS blocks identifiers on the page
})
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment