How to make an async call in a beforeCreate hook of a Vue instance?
问题 I am building a Vuejs app with authentication. When the page is loaded and I initialise the app Vuejs instance, I am using beforeCreate hook to set up the user object. I load a JWT from localStorage and send it to the backend for verification. The issue is that this is an async call, and the components of this app object (the navbar, the views etc.) are being initialised with the empty user data before the call returns the result of the verification. What is the best practice to delay the