Vue: Ability to access context from serverPrefetch

Created on 6 Feb 2019  路  1Comment  路  Source: vuejs/vue

What problem does this feature solve?

After vue 2.6 was released and serverPrefetch hook was introduces I lost a possibility to update httpCode during SSR if there was a data fetching failure.

What does the proposed API look like?

Provide access to context from the serverPrefetch hook.

ssr feature request intend to implement

Most helpful comment

We should probably provide context as the first argument. In the meanwhile you can use this.$ssrContext.

>All comments

We should probably provide context as the first argument. In the meanwhile you can use this.$ssrContext.

Was this page helpful?
0 / 5 - 0 ratings