Open developerpoidi opened 5 years ago
Here worked with this version: "react-final-form-hooks": "1.0.0-alpha.1"
Yep, same here. You can get around it by defining the submit function outside the component like this:
const handleSubmit = (values) => console.log(values)
const App = () => {
const { form } = useForm({
onSubmit: handleSubmit
});
return <div>Not needed</div>;
};
But in my case I need access to the props in the component. Not sure what's going on.
ref #25
since #25 has been merged and released
should this issue be closed?
Version: react-final-form-hooks@1.0.0
I'm not able to use the latest release 1.0.0. I get following excpetion: "Uncaught TypeError: form.setConfig is not a function" Here is a simple example: https://codesandbox.io/s/n03r1q8omm
When I look at the source, the problem is, that you access the "form" object instead of "form.current" or "getForm()".