
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
@vue-composable/axios
Advanced tools
Use Axios library with the composition-api
Vue3 aka vue-next is fully supported
# @vue/composition-api
# install with yarn
yarn add @vue/composition-api @vue-composable/axios
# install with npm
npm install @vue/composition-api @vue-composable/axios
# vue-next / vue@3.0.0
# install with yarn
yarn add @vue-composable/axios
# install with npm
npm install @vue-composable/axios
Check our documentation
<template>
<div>
<p>current Id {{ id }}</p>
<p>
<button @click="id--">prev</button>
<button @click="id++">next</button>
</p>
<p v-if="loading">loading...</p>
<div v-else>
<p>Status: {{ status }}</p>
{{ data }}
</div>
</div>
</template>
<script>
import { ref, watch } from "@vue/runtime-core";
import { useAxios } from "@vue-composable/axios";
export default {
name: "axios-example",
setup() {
const id = ref(1);
const { data, loading, exec, error, status } = useAxios();
watch(id, id => {
exec({
method: "GET",
url: "https://reqres.in/api/user/" + id
});
});
return {
id,
data,
loading,
status
};
}
};
</script>
git checkout -b feat/new-composable
git commit -am 'feat(composable): add a new composable'
git push origin feat/new-composable
# install packages
yarn
# build and test for v2
yarn build --version=2
yarn test:vue2
# build and test for v3
yarn build
yarn test
git checkout -b feat/new-composable
git commit -am 'feat(composable): add a new composable'
git push origin feat/new-composable
FAQs
@vue-composable/axios
The npm package @vue-composable/axios receives a total of 93 weekly downloads. As such, @vue-composable/axios popularity was classified as not popular.
We found that @vue-composable/axios demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.