besimkingB
Convex Community13mo ago
7 replies
besimking

Generic Query and Mutations

My issue is this: I repeat same or quite close things a lot eg.
import { useQuery } from 'convex/react';
import { api } from '../../../../convex/_generated/api';

export const useGetExamples = () => {
    const data = useQuery(api.example.getExamples);
    const isLoading = data === undefined;

    return { data, isLoading };
};
Was this page helpful?