Skip to content

Instantly share code, notes, and snippets.

@prasanna1211
Created January 25, 2018 06:51
Show Gist options
  • Save prasanna1211/1a51dd5262f9238e1f22e00ae00d3d86 to your computer and use it in GitHub Desktop.
Save prasanna1211/1a51dd5262f9238e1f22e00ae00d3d86 to your computer and use it in GitHub Desktop.
import React from 'react'; 
import { reduxForm } from 'redux-form'; 
const ExampleForm = ({ invalid, submitting, reset }) => { 
  const handleSubmit = (values) => { 
    console.log(values); // ...code to submit values 
   }; 
  return ( 
    <form onSubmit={handleSubmit}> 
      
      {/* Some Input Fields */} 
     
     <button onClick={reset}>Reset</button> 
     <button type="submit" disabled={invalid || submitting}>Submit</button> 
    </form> 
   ); 
 }; 
 export default reduxForm({ form: 'example' })(ExampleForm);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment