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

hooks.ts

10 lines197 Bytes

1import { useQuery } from '@tanstack/react-query'
2​
3export function useMyHook() {
4 const query = useQuery({
5 queryKey: ['test'],
6 queryFn: () => 'hello',
7 })
8​
9 return { data: query.data }