async clientPrefetch hook - analog of serverPrefetch, waiting for data loaded on client
What problem does this feature solve?
Here are discussions: https://github.com/vuejs/vue-router/issues/1144 https://github.com/vuejs/vue/issues/7209 https://github.com/vuejs/pinia/discussions/988 There are cases where you need some data fetched before other components are initialized (mount hook called), for example authentication checked or user data fetched. Currently need to use watches, which might be multiple, instead of a simple mounted hook in child components.
What does the proposed API look like?
Just the same as serverPrefetch, but on client.