fetch initial data for app
In my apps I need to load some initial data from server.
At this moment I’m calling the axios functions from ‘mounted’ in ‘MyLayout.vue’, that’s where the app goes after login window.
I don’t think it’s the best place to do it.
Is there a proper place to execute these initial functions ? get axios data and other configs needed for the app ? It must be done after the login.
I saw the boot folder but it is not executed everytime the users does login. Just if he refreshes the page.
metalsadman last edited by
@Pedro mounted is fine or at created, every situation is different, choose which is best in your case.