useForm

hello in the new version of refine , which one should I import for useForm?the original one or refine one
5 Replies
kapa.ai
kapa.ai2y ago
Hey @saji_nael! I'm the kapa.ai support bot. I've searched through the docs to try to answer your question. :wave:
kapa.ai
kapa.ai2y ago
---------------------- You should use the useForm hook provided by @pankod/refine-react-hook-form for the new version of refine. You can find the API reference for useForm here (https://refine.dev/docs/packages/documentation/react-hook-form/useForm). It returns all the properties returned by React Hook Form (https://react-hook-form.com) of the useForm hook, as well as the following return values:
import { useForm } from "@pankod/refine-react-hook-form";

const {
saveButtonProps,
refineCore: { queryResult, ... },
} = useForm({ ... });
import { useForm } from "@pankod/refine-react-hook-form";

const {
saveButtonProps,
refineCore: { queryResult, ... },
} = useForm({ ... });
You can also find an example of how to use useForm here (https://refine.dev/docs/api-reference/core/hooks/useForm/#example). ----------------------
Home
React hook for form validation without the hassle
useForm | refine
useForm is a hook that allows to manage forms. It has some action methods that create, edit and clone the form. The hook return value comes to according to the called action and it can run different logic depending on the action.
kapa.ai
kapa.ai2y ago
<@1000087684632547538> kapa.ai is still learning and improving, please let us how it did by reacting below
national-gold
national-gold2y ago
refine one to use refine features 🙏
Omer
Omer2y ago
Hey @saji_nael , For more information about this topic, you can visit our documentation at https://refine.dev/docs/packages/documentation/react-hook-form/useForm/