You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`app`|Root Vue Instance| Client & Server | The root Vue instance options that includes all your plugins. For example, when using `axios`, you can get access to `$axios` through `context.app.$axios`.|
24
-
|`isClient`|`Boolean`| Client & Server |**Deprecated!** Use `process.client`. Boolean to let you know if you're actually renderer from the client-side. |
25
-
|`isServer`|`Boolean`| Client & Server |**Deprecated!** Use `process.server`. Boolean to let you know if you're actually renderer from the server-side. |
26
-
|`isStatic`|`Boolean`| Client & Server |**Deprecated!** Use `process.static`. Boolean to let you know if you're actually inside a generated app (via `nuxt generate`). |
23
+
|`app`|`NuxtAppOptions`| Client & Server | The root Vue instance options that includes all your plugins. For example, when using `axios`, you can get access to `$axios` through `context.app.$axios`. |
24
+
|`isClient`|`Boolean`| Client & Server |**Deprecated!** Use `process.client`. Boolean to let you know if you're actually renderer from the client-side. |
25
+
|`isServer`|`Boolean`| Client & Server |**Deprecated!** Use `process.server`. Boolean to let you know if you're actually renderer from the server-side. |
26
+
|`isStatic`|`Boolean`| Client & Server |**Deprecated!** Use `process.static`. Boolean to let you know if you're actually inside a generated app (via `nuxt generate`). |
27
27
|`isDev`|`Boolean`| Client & Server | Boolean to let you know if you're in dev mode, can be useful for caching some data in production. |
28
28
|`isHMR`|`Boolean`| Client & Server | Boolean to let you know if the method/middleware is called from webpack hot module replacement (*only on client-side in dev mode*). |
| `from` | [Vue Router Route](https://router.vuejs.org/en/api/route-object.html) | Client | The route navigated from
30
+
|`from`|[Vue Router Route](https://router.vuejs.org/en/api/route-object.html)| Client | The route navigated from |
31
31
|`store`|[Vuex Store](https://vuex.vuejs.org/en/api.html#vuexstore-instance-properties)| Client & Server | Vuex Store instance. **Available only if the [vuex store](/guide/vuex-store) is set**. |
32
32
|`env`|`Object`| Client & Server | Environment variables set in `nuxt.config.js`, see [env api](/api/configuration-env). |
33
-
|`params`|`Object`| Client & Server | Alias of `route.params`. |
33
+
|`params`|`Object`| Client & Server | Alias of `route.params`. |
34
34
|`query`|`Object`| Client & Server | Alias of `route.query`. |
35
-
|`req`|[`http.Request`](https://nodejs.org/api/http.html#http_class_http_incomingmessage)| Server | Request from the Node.js server. If Nuxt is used as a middleware, the request object might be different depending on the framework you're using.<br>**Not available via `nuxt generate`**. |
35
+
|`req`|[`http.Request`](https://nodejs.org/api/http.html#http_class_http_incomingmessage)| Server | Request from the Node.js server. If Nuxt is used as a middleware, the request object might be different depending on the framework you're using.<br>**Not available via `nuxt generate`**. |
36
36
|`res`|[`http.Response`](https://nodejs.org/api/http.html#http_class_http_serverresponse)| Server | Response from the Node.js server. If Nuxt is used as a middleware, the res object might be different depending on the framework you're using.<br>**Not available via `nuxt generate`**. |
37
-
|`redirect`|`Function`| Client & Server | Use this method to redirect the user to another route, the status code is used on the server-side, defaults to `302`. `redirect([status,] path [, query])`. |
37
+
|`redirect`|`Function`| Client & Server | Use this method to redirect the user to another route, the status code is used on the server-side, defaults to `302`. `redirect([status,] path [, query])`. |
38
38
|`error`|`Function`| Client & Server | Use this method to show the error page: `error(params)`. The `params` should have the properties `statusCode` and `message`. |
39
39
|`nuxtState`|`Object`| Client | Nuxt state, useful for plugins which uses `beforeNuxtRender` to get the nuxt state on client-side before hydration. **Available only in `universal` mode**. |
40
40
|`beforeNuxtRender(fn)`|`Function`| Server | Use this method to update `__NUXT__` variable rendered on client-side, the `fn` (can be asynchronous) is called with `{ Components, nuxtState }`, see [example](https://github.com/nuxt/nuxt.js/blob/cf6b0df45f678c5ac35535d49710c606ab34787d/test/fixtures/basic/pages/special-state.vue). |
0 commit comments