Support @vue/composition-api setup function
See original GitHub issueWhat problem does this feature solve?
Don’t extend context and this with $axios field
What does the proposed changes look like?
import { useAxios } from '@nuxtjs/axios';
...
setup() {
const $axios = useAxios();
return { $axios };
}
...
<div align="right">This feature request is available on Nuxt community (#c365)</div>Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Composition API: setup() - Vue.js
The setup() hook serves as the entry point for Composition API usage in components in the following cases:
Read more >Vue.js 3 Composition API: the SetUp Function | Geek Culture
Vue 3 introduced the setUp function. It enables us to extract repeatable parts of components into reusable pieces of code.
Read more >An ultimate guide to the Vue 3 Composition API
Setup function. The setup() function enables you to extract parts of components and group them logically together. It helps you wrap your logic ......
Read more >Vue 3.2 - Using Composition API with Script Setup
Vue 3 introduced the Composition API as a new way to work with reactive state in a Vue application. Rather than organizing code...
Read more >Diving Into Vue 3 - The Setup Function - Deepgram Blog ⚡️
The Composition API is born from experience - the experience of struggling to keep track of logic jumping around within a Vue component,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here’s a simple
plugincomposable you can create. The same method can be used for almost all nuxt modules@crutch12 If you want to use the provide/inject methodology with Nuxt 2 you can do so with the onGlobalSetup helper.