Skip to content

[TS] Make useForm Config parameterized #34

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

Merged
merged 1 commit into from
Apr 30, 2019
Merged

[TS] Make useForm Config parameterized #34

merged 1 commit into from
Apr 30, 2019

Conversation

timdorr
Copy link
Contributor

@timdorr timdorr commented Mar 22, 2019

This lets you define types for your values object on onSubmit. Here's a quick view what it looks like:

  const { form, handleSubmit, submitting } = useForm<
    Config<{ title: string; description: string }>
  >({
    onSubmit: async values => {

Also, I got rid of the duplicate FormConfig interface.

This lets you define types for your `values` object on onSubmit. Here's a quick view what it looks like: 
```ts
  const { form, handleSubmit, submitting } = useForm<
    Config<{ title: string; description: string }>
  >({
    onSubmit: async values => {
```
@erikras erikras merged commit 95a03c6 into final-form:master Apr 30, 2019
@timdorr timdorr deleted the patch-1 branch April 30, 2019 15:02
@erikras
Copy link
Member

erikras commented May 1, 2019

Published in v2.0.0.

@lock
Copy link

lock bot commented Jun 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants