Closed
Description
import React from "react"
export default class App extends React.Component {
render() {
return (
<div>
<p>Parent</p>
<AppItem />
</div>
)
}
}
const AppItem = () => {
return <div>child</div>
}
Works with npm start
Breaks with npm build
, giving Element type is invalid error
If you rearrange the code so that AppItem is defined before App (or you use a hoisted function declaration) it works in both environments.
I suspect this has something to do with the react inline elements transformer?
Activity