0

Here's my problem

Building a React Component Library in React 16.3 and using React.Fragments.

Sadly this needs to support a few different React sites including one which includes React 15.4.1.

When trying to use a component which has React.Fragment even after babel, minification etc I get

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.

Is there any way at all to support this use case without updating the old sites react version ?

StevieB
  • 6,263
  • 38
  • 108
  • 193

1 Answers1

0
<span style={{ display: 'contents' }}></span>

This works for me.