Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
export const PizzaForm = ({ space }) => (
<form>
<label>Name</label>
<input
type="text"
value={space.name || ''}
onChange={space('name')} // Whenever user types, `space.name` is updated
/>
<label>Do you like pizza?</label>
<input
type="checkbox"
checked={space.pizzaLover || false}
onChange={space('pizzaLover')} // Assigns true or false to `space.pizzaLover`
/>
</form>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment