Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Because of changes in React 16, server-side rendering no longer behaves any differently in production mode than in any other environment. Libraries such as Next.js configure Webpack to compile client code in production mode. Many users need to run multiple different environments with different configurations. For example, a staging environment might need to run a production build of the app but it's NODE_ENV might be 'staging'. If this is the case, the server will always render long classnames while the client will always expect short classnames.

In Next.js, this causes the initial render to break but every subsequent render to work correctly. After tracking this bug throughout my entire stack, I determined that it comes from material-ui's configuration approach.

Rather than requiring the user to set process.env.NODE_ENV to production, allow the user to pass some kind of configuration variable that would trigger createGenerateClassName.js to operate in "production mode".

Tech
Version

Material-UI
1.0.0-beta.12

React
16.0

browser
all

etc
Next.js 4.0-beta.2

Issue 2:
Problem description

With the recent change to flow 0.53, we encountered a small but perhaps unnecessary size increase. There are two sources of this:

the conditional check for typeof seems quite long

there are two assignments to propTypes

This was occurring before the PR #7869 as verified in the build package, but I assume the long typeof check pushed us up and over that limit.

This could be a bug in the plugin, or it could be a quirk with our usage.

Steps to reproduce

yarn build

open RadioGroup.js

look at the bottom to find

RadioGroup.propTypes = process.env.NODE_ENV !== "production" ? (_ref2 = {
classes: require('prop-types').object.isRequired,
children: typeof (React.ChildrenArray == null ? {} : React.ChildrenArray) === 'function' ? require('prop-types').instanceOf(React.ChildrenArray == null ? {} : React.ChildrenArray) : require('prop-types').any
}, (0, _defineProperty3.default)(_ref2, 'classes', require('prop-types').object), (0, _defineProperty3.default)(_ref2, 'className', require('prop-types').string), (0, _defineProperty3.default)(_ref2, 'name', require('prop-types').string), (0, _defineProperty3.default)(_ref2, 'onBlur', require('prop-types').func), (0, _defineProperty3.default)(_ref2, 'onChange', require('prop-types').func), (0, _defineProperty3.default)(_ref2, 'onKeyDown', require('prop-types').func), (0, _defineProperty3.default)(_ref2, 'value', require('prop-types').string.isRequired), _ref2) : {};
RadioGroup.propTypes = process.env.NODE_ENV !== "production" ? (_ref3 = {
classes: require('prop-types').object.isRequired,
children: typeof (React.ChildrenArray == null ? {} : React.ChildrenArray) === 'function' ? require('prop-types').instanceOf(React.ChildrenArray == null ? {} : React.ChildrenArray) : require('prop-types').any
}, (0, _defineProperty3.default)(_ref3, 'classes', require('prop-types').object), (0, _defineProperty3.default)(_ref3, 'className', require('prop-types').string), (0, _defineProperty3.default)(_ref3, 'name', require('prop-types').string), (0, _defineProperty3.default)(_ref3, 'onBlur', require('prop-types').func), (0, _defineProperty3.default)(_ref3, 'onChange', require('prop-types').func), (0, _defineProperty3.default)(_ref3, 'onKeyDown', require('prop-types').func), (0, _defineProperty3.default)(_ref3, 'value', require('prop-types').string.isRequired), _ref3) : {};