老哥,问个nuxtjs的问题

4 / 362

我看官方写的asyncData是

Sometimes you just want to fetch data and pre-render it on the server without using a store. asyncData is called every time before loading the page component. It will be called server-side once (on the first request to the Nuxt app) and client-side when navigating to further routes. This method receives the context as the first argument, you can use it to fetch some data and Nuxt.js will merge it with the component data.

没看错的话应该asyncData服务端运行一次,后续的路由的页面都是客户端执行的asyncData对吧?我看你这个论坛里好像asyncData都是服务端执行的?

为啥?

需要配置什么?

何苗