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

Feature request: new render prop handleSubmitSync #1005

Open
vtaits opened this issue Aug 15, 2022 · 0 comments
Open

Feature request: new render prop handleSubmitSync #1005

vtaits opened this issue Aug 15, 2022 · 0 comments

Comments

@vtaits
Copy link

vtaits commented Aug 15, 2022

Are you submitting a bug report or a feature request?

Feature request

What is the current behavior?

This code

<Form onSubmit={onSubmit}>
  {props => (
    <form onSubmit={props.handleSubmit}>

      ... fields go here...

      <button type="submit">Submit</button>
    </form>
  )}
</Form>

conflicts with eslint rule @typescript-eslint/no-misused-promises

https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-misused-promises.md

What is the expected behavior?

I suggest to add new render prop handleSubmitSync that wraps handleSubmit and always returns undefined.

What's your environment?

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

1 participant