I just updated to react 16.2 and I want to use the cool Fragment feature. However I get strange error as soon as just use it in a simple way:
<React.Fragment>asd</React.Fragment>
The error states: Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: symbol.
When I log the above code and just a random component I have defined I get this information:
$$typeof: Symbol(react.element)
key: null
props: {children: "asd"}
ref: null
type: Symbol(react.fragment)
...
When I log my element I get the almost same information:
$$typeof: Symbol(react.element)
key: null
props: {children: "sfdghs"}
ref: null
type:ƒ Column(_ref)
My question is: why does the app expect string or function.
All related dependancies from my package.json are as such:
"devDependencies": {... "@types/react": "^16.0.0" ...}
"dependencies" : {... "react": "^16.2.0", "typescript": "2.6.2" ...}
If anyone can give me any information on how to debug this, I will be very grateful!
You need a minimum of 16.2.0
for both react
& react-dom
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With