Skip to content

Instantly share code, notes, and snippets.

@cbrannen9a
Created November 8, 2018 11:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cbrannen9a/f8f41a6df8ded43ff5ff307cc692e305 to your computer and use it in GitHub Desktop.
Save cbrannen9a/f8f41a6df8ded43ff5ff307cc692e305 to your computer and use it in GitHub Desktop.
Partial Address Form adding value and change handling
function AddressForm(props) {
const { state, handleChange } = props;
return (
<Fragment>
<Typography variant="h6" gutterBottom>
Shipping address
</Typography>
<Grid container spacing={24}>
<Grid item xs={12} sm={6}>
<TextField
required
id="firstName"
name="firstName"
label="First name"
fullWidth
autoComplete="fname"
value={state.addressForm.firstName}
onChange={handleChange('firstName', 'addressForm')}
/>
</Grid>
//...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment