Skip to content

Instantly share code, notes, and snippets.

@adailey14
adailey14 / SimpleForm.js
Created January 7, 2016 00:33
Simple Example showing how initialValues trigger 2 renders
import React, {Component, PropTypes} from 'react';
import {reduxForm} from 'redux-form';
const fields = ['firstName', 'lastName', 'email', 'sex', 'favoriteColor', 'employed', 'notes'];
class SimpleForm extends Component {
static propTypes = {
fields: PropTypes.object.isRequired,
handleSubmit: PropTypes.func.isRequired,
resetForm: PropTypes.func.isRequired,
submitting: PropTypes.bool.isRequired