-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove fetch() usage as leftover from Nuxt #9711
Comments
@eva-vashkevich suggested moving the logic of |
The whole
|
After analyzing the hackish implementation of Nuxt to create the https://codesandbox.io/s/vue3-vuex-custom-hook-yjghfv?file=/src/views/Home.vue NOTE: This is available exclusively using Options API and not inside setup @rak-phillip . |
I am postponing then this refactoring after migration to Vue3 and keeping it open to define guidelines for the alternatives of |
@cnotv do we understand the purpose of the code related to invoking fetch on HMR1 and matching routes2? edit: we also have fetch logic related to refreshing3 Footnotes
|
Did we not say we were going to remove this? Because of the way it's written, I am not so sure is going to work with Vue3. Also thanks for pointing it out. |
Just for the record, could we write down an update of what is the current issue after isolating the |
Ok so to summarize, we have this code coming from Nuxt which we are not able to identify the whole purpose. Therefore we'll rather try to recreate some further PoC based on our code. This should ensure the right execution of the lifecycle hooks and related loading components. |
We can close this as migration is completed. Postponing this in a future architecture talk. |
Description
As the Nuxt world is departed, we should replace data fetching in the Vue3 way: https://vuejs.org/guide/built-ins/suspense.html#async-setup
The feature is not supported in Vue 2.7 https://v2.vuejs.org/v2/guide/migration-vue-2-7
The pattern is so specifically intended to have it as essential rule in the linter: https://eslint.vuejs.org/rules/no-lifecycle-after-await.html
The text was updated successfully, but these errors were encountered: