React version: 18.2.0
Steps To Reproduce
- Try to render this component: const LazyFragment = lazy(() => Promise.resolve({ default: Fragment }));
Link to code example:
https://github.com/tom-sherman/react-lazy-fragment-bug
The current behavior
It throws an error:
Cannot convert a Symbol value to a string
The expected behavior
It should throw an error related to invariant 306 eg.
Element type is invalid. Received a promise that resolves to: Fragment. Lazy element type must resolve to a class or function.