For consideration.

These warnings are already covered by renderers based on react-reconciler. Maybe we don't gain that much by mirroring them in the shallow renderer? Maybe it's not worth the added complexity? Particularly with more complicated warnings like the ones being added for #12419 and #12404.
'(for built-in components) or a class/function (for composite components) ' +
            `but got: ${typeString}.`,
        );
      }).toThrowError(
        'ReactShallowRenderer render(): Shallow rendering works only with custom ' +
          `components, but the provided element type was \`${typeString}\`.`,
      );
    };
    renderAndVerifyWarningAndError(undefined, 'undefined');
    renderAndVerifyWarningAndError(null, 'null');
    renderAndVerifyWarningAndError([], 'array');
    renderAndVerifyWarningAndError({}, 'object');
  });
  it('should have initial state of null if not defined', () => {
    class SomeComponent extends React.Component {
      render() {
        return <span />;
      }
    }
    const shallowRenderer = createRenderer();
    shallowRenderer.render(<SomeComponent />);
    expect(shallowRenderer.getMountedInstance().state).toBeNull();
  });
  it('should warn if both componentWillReceiveProps and static getDerivedStateFromProps exist', () => {
    class ComponentWithWarnings extends React.Component {
      state = {};
      static getDerivedStateFromProps(props, prevState) {
        return null;
      }
      UNSAFE_componentWillReceiveProps(nextProps) {}