Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, { Component } from 'react'
- import reduxForm from 'redux-form'
- class Signin extends Component {
- handleFormSubmit({ email, password }) {
- console.log(email, password)
- }
- render() {
- const { handleSumbit, fields: {email, password}} = this.props
- return(
- <form onSubmit={handleSumbit(this.handleFormSubmit.bind(this))}>
- <fieldset className='form-group'>
- <label>Username:</label>
- <input {...username} className='form-control' />
- </fieldset>
- <fieldset className='form-group'>
- <label>Password:</label>
- <input {...password} className='form-control' />
- </fieldset>
- <button action='submit' className='btn btn-primary'>
- Sign in
- </button>
- </form>
- )
- }
- }
- export default reduxForm({
- form: 'signin',
- fields: ['username', 'password']
- })(Signin)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement