Home

Issue: 404

nuxt fetch and middleware life cycle

[issue link]

Does the middleware or fetch run first when entering into a route? It currently appears to fire asynchronously.

Scenario

  1. I have a page route that uses fetch to populate a store.
  2. I have a middleware that uses store state to determine access to the page route

Result currently is that the store state is not populated in time for the middleware to work.

This question is available on Nuxt.js community (#c346)