Open edwards-afterpay opened 3 years ago
@edwards-afterpay This isn't a problem with react2angular
. To quote the error: "React.createElement: type is invalid...Did you accidentally export a JSX literal instead of a component?
"
The problem is that Profile
isn't a component here but a JSX literal. To fix your error, you can just make it a function:
const Profile = () => (
<ErrorBoundary>
<Suspense fallback={<div>Loading...</div>}>
<ProfileLazy />
</Suspense>
</ErrorBoundary>
);
Below code doesn't work as I expected. Have been running into
React lazy component
Angular react2angular wrapper
Can I clarify if react2angular will work with the dynamic imports in general, or if there is any issue with the code snippet I have written? Keen to hear your thoughts to understand how can we make this work.