Skip to content

Instantly share code, notes, and snippets.

@DZuz14
Created August 22, 2019 08:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DZuz14/cde18c22e95084d5e7e63487cc406506 to your computer and use it in GitHub Desktop.
Save DZuz14/cde18c22e95084d5e7e63487cc406506 to your computer and use it in GitHub Desktop.
User Profile Form With Action Creator
import React, { Component } from 'react';
import { submitProfileForm } from '../actions/profile-form';
export default class ProfileForm extends Component {
handleSubmit = e => {
e.preventDefault();
submitProfileForm();
};
render() {
return (
<form onSubmit={this.handleSubmit}>
<input type="text" placeholder="Full Name" name="full-name" />
<input type="email" placeholder="xyz@gmail.com" name="email" />
<input
type="text"
placeholder="https://linkedin.com/274482392"
name="linked-in-profile"
/>
<button type="submit">Save</button>
</form>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment