Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: form.setConfig is not a function #29

Open
developerpoidi opened this issue Feb 12, 2019 · 4 comments
Open

Uncaught TypeError: form.setConfig is not a function #29

developerpoidi opened this issue Feb 12, 2019 · 4 comments

Comments

@developerpoidi
Copy link

Version: [email protected]

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()".

@brunodesde1987
Copy link

Here worked with this version: "react-final-form-hooks": "1.0.0-alpha.1"

@durre
Copy link

durre commented Mar 1, 2019

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.

@zhuangya
Copy link

zhuangya commented Mar 4, 2019

ref #25

@zhuangya
Copy link

zhuangya commented Mar 7, 2019

since #25 has been merged and released

should this issue be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants