Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

use-projects.js

9 lines186 Bytes

1import { useQuery } from 'react-query'
2​
3import fetch from '../libs/fetch'
4​
5function useProjects() {
6 return useQuery('projects', () => fetch('/api/data'))
7}
8​
9export default useProjects