Static GitHub Issues

[2961] Middleware store dispatch or commit before redirect will not write data on server

prev: Nuxt amp example: should not remove all script tags
next: Are components cached when imported multiple times?

Sorry, my English is poor glitch

When you visit index.vue on server It has a middleware test.js

store.commit('SET_USER', 'hello');
return redirect('/about');

You will be redirect to about.vue You will find that authUser is null

You click the back link to repeat the above action on client You will find that authUser has value

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2568">#c2568</a>)</em></sub></div>