Skip to content

Instantly share code, notes, and snippets.

@p14n
Created May 15, 2018 19:56
Show Gist options
  • Save p14n/3d64254f05d109c0b9c1fc9fbde12aea to your computer and use it in GitHub Desktop.
Save p14n/3d64254f05d109c0b9c1fc9fbde12aea to your computer and use it in GitHub Desktop.
User input
const PayForm = ({ account, dispatch }) => (
<Form
onSubmit={submittedValues => {
dispatch({ type: "pay", payee: account, ...submittedValues });
}}
>
{formApi => (
<form onSubmit={formApi.submitForm} id="pform">
<label htmlFor="password">Password</label>
<Text field="password" id="password" />
<button type="submit">Withdraw</button>
</form>
)}
</Form>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment