s_mS
Convex Community4y ago
11 replies
s_m

Hi The documentation states that Code

Hi! The documentation states that "Code generation isn't required to use Convex" but running the default app without an _generated fails because of imports like import { useQuery, useMutation } from '../convex/_generated/react'. I don't like generated code, so I am trying to avoid it, and when looking inside convex/_generated/react I can see useQuery = useQueryGeneric so in theory I can do import { useQueryGeneric as useQuery, useMutationGeneric as useMutation} from "convex/react"; instead, but I'm not sure I understand why this generated code is necessary in the first place: is it just for typescript (i.e: the react.d.ts) and if so, does providing my own typings in my app achieve the same goal, or is there some additional behaviour that I'll lose from not using the generated code? Thank you.
Was this page helpful?