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?
Works with
npm startBreaks with
npm build, giving Element type is invalid errorIf 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?