content: import React from 'react';
  import ProductNew from '../components/ProductNew';
  import { connect } from 'react-redux';
  import { bindActionCreators } from 'redux';
  import { createProduct } from '../actions';
  import { withRouter } from 'react-router';
  
  const ProductNewContainer = (props) => {
    const onCancel = () => {
      props.router.push('/products');
    };
  
    return (
      <ProductNew {...props} create={props.createProduct} cancel={onCancel} />
    );
  };
  ProductNewContainer.propTypes = {/*
   React.PropTypes.array
   React.PropTypes.bool
   React.PropTypes.func
   React.PropTypes.number
   React.PropTypes.object
   React.PropTypes.string
   React.PropTypes.node // anything that can be rendered
   React.PropTypes.element
   React.PropTypes.instanceOf(MyClass)
   React.PropTypes.oneOf(['Thing 1', 'Thing 2'])
   React.PropTypes.oneOfType([
   React.PropTypes.bool,
   React.PropTypes.string
   ])
   React.PropTypes.arrayOf(React.PropTypes.string)
   React.PropTypes.objectOf(React.PropTypes.string)
   React.PropTypes.shape({
   age: React.PropTypes.number,
   name: React.PropTypes.string
   })
   React.PropTypes.any */
  };
  ProductNewContainer.defaultProps = {};
  
  const mapStateToProps = (state) => {
    return {
      brands: state.brands,
    };
  };
  
  const mapDispatchToProps = (dispatch) => {
    return bindActionCreators({ createProduct }, dispatch);
  };
  
  export default connect(mapStateToProps, mapDispatchToProps)(withRouter(ProductNewContainer));
  