This:

```js
createElement(<div />)
```

doesn't currently give a distinguishable message.

https://stackoverflow.com/questions/51110436/wrapping-provider-in-same-component-throws-element-type-is-invalid-expected-a-s

But we can easily detect it by checking for `$$typeof` and in that case suggest something more concrete (e.g. "Did you accidentally export JSX instead of a component?").
setCurrentlyValidatingElement(fragment);
  const keys = Object.keys(fragment.props);
  for (let i = 0; i < keys.length; i++) {
    const key = keys[i];
    if (key !== 'children' && key !== 'key') {
      warning(
        false,
        'Invalid prop `%s` supplied to `React.Fragment`. ' +
          'React.Fragment can only have `key` and `children` props.',
        key,
      );
      break;
    }
  }
  if (fragment.ref !== null) {
    warning(false, 'Invalid attribute `ref` supplied to `React.Fragment`.');
  }
  setCurrentlyValidatingElement(null);
}
export function createElementWithValidation(type, props, children) {
  const validType = isValidElementType(type);