Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
vue-data-fetcher
Advanced tools
Vue Data Fetcher is a collection of composable functions that provide utility functionalities for common tasks in Vue.js projects. This package is designed to simplify and streamline the development process by encapsulating complex logic into reusable com
Vue Data Fetcher is a collection of composable functions that provide utility functionalities for common tasks in Vue.js projects. This package is designed to simplify and streamline the development process by encapsulating complex logic into reusable composable functions.
You can install the Vue Data Fetcher package via npm:
npm install vue-data-fetcher
To use the Vue Data Fetcher package in your Vue.js project, you can import the individual composable functions as needed.
useDataFetcherList
composable:<script setup lang="ts">
import apiClient from '@/api/ApiMock'
import type { RolesListResponse, RolesListRequest } from '@/api/ApiTypes'
import { useDataFetcherList } from 'vue-data-fetcher'
const { responseData, loading, error } = useDataFetcherList<RolesListRequest, RolesListResponse>(
apiClient.rolesList,
{} as RolesListRequest
)
</script>
<template>
<h2 class="loading" v-if="loading">loading</h2>
<h2 v-else-if="error">
{{ error }}
</h2>
<h2 class="response" v-else>{{ JSON.stringify(responseData) }}</h2>
</template>
useDataFetcherFind
composable:<script setup lang="ts">
import apiClient from '@/api/ApiMock'
import type { RoleFindRequest, RoleFindResponse } from '../api/ApiTypes'
import { useDataFetcherFind } from 'vue-data-fetcher'
const { responseData, loading, error } = useDataFetcherFind<RoleFindRequest, RoleFindResponse>(
apiClient.roleFind,
'roleId'
)
</script>
<template>
<h2 class="loading" v-if="loading">loading</h2>
<h2 v-else-if="error">
{{ error }}
</h2>
<h2 class="response" v-else>{{ JSON.stringify(responseData) }}</h2>
</template>
FAQs
Vue Data Fetcher is a collection of composable functions that provide utility functionalities for common tasks in Vue.js projects. This package is designed to simplify and streamline the development process by encapsulating complex logic into reusable com
The npm package vue-data-fetcher receives a total of 0 weekly downloads. As such, vue-data-fetcher popularity was classified as not popular.
We found that vue-data-fetcher 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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.