Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@DZuz14
Last active August 22, 2019 08:04
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/dd0ed263b5725bf40e77d12bfa5bd1e6 to your computer and use it in GitHub Desktop.
Save DZuz14/dd0ed263b5725bf40e77d12bfa5bd1e6 to your computer and use it in GitHub Desktop.
User Profile Form, No Action Creator.
import React, { Component } from 'react';
import { submitProfileForm } from '../actions/profile-form';
export default class ProfileForm extends Component {
handleSubmit = e => {
e.preventDefault();
// Emit the action here!!!
};
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