I need to show a splash screen while data is loaded in the final view.
I have this in router:
{
path: "/home",
name: "Home",
component: () =>
import(
/* webpackPrefetch: true */ /* webpackChunkName: "general" */ "@/views/Home"
),
meta: {
layout: "MainLayout",
},
beforeEnter: (to, from, next) => {
store.dispatch("modGeneral/actGetNews").then(() => {
next();
});
},
},
I need to show another route while this is working: store.dispatch("modGeneral/actGetNews"), maybe put any timeout to render it but I can't figure it out yet how to do that.