react-final-form
react-final-form copied to clipboard
Feature request: new render prop `handleSubmitSync`
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?
[email protected]
[email protected]
[email protected]
[email protected]
@typescript-eslint/[email protected]