
**Do you want to request a *feature* or report a *bug*?**
Bug

**What is the current behavior?**
The shallow renderer defaults a class component's state to empty object if it's not set. "Real" renderers don't seem to do this, so a component can render successfully in the shallow renderer, but fail at runtime in the browser with a null reference error.

**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.**
Here is ReactDOM's behavior (crashes reading an uninitialized state value): https://codesandbox.io/s/4jv82zmp0
Here is the shallow renderer behavior (component able to render): https://codesandbox.io/s/pp733nrxzq

**What is the expected behavior?**
They initialize state in the same way.

**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
React 16. This wasn't an issue in React 15.
const shallowRenderer = createRenderer();
    const result = shallowRenderer.render(<SomeComponent />);
    expect(result.type).toBe('div');
    expect(result.props.children).toEqual([
      <span className="child1" />,
      <span className="child2" />,
    ]);
    const updatedResult = shallowRenderer.render(<SomeComponent aNew="prop" />);
    expect(updatedResult.type).toBe('a');
    const mockEvent = {};
    updatedResult.props.onClick(mockEvent);
    const updatedResultCausedByClick = shallowRenderer.getRenderOutput();
    expect(updatedResultCausedByClick.type).toBe('a');
    expect(updatedResultCausedByClick.props.className).toBe('was-clicked');
  });
  it('can access the mounted component instance', () => {
    class SimpleComponent extends React.Component {
      someMethod = () => {
        return this.props.n;
      };
      render() {
        return <div>{this.props.n}</div>;
      }
    }
    const shallowRenderer = createRenderer();
    shallowRenderer.render(<SimpleComponent n={5} />);
    expect(shallowRenderer.getMountedInstance().someMethod()).toEqual(5);
  });
  it('can shallowly render components with contextTypes', () => {
    class SimpleComponent extends React.Component {