Closed
Description
ErrorBoundary is implemented by using jsx ppx now, but it has a warning in runtime.
Warning: Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.
at RescriptReactErrorBoundary
It is caused by the generated js representation is not fit to React API.
// with jsx ppx @react.component
function RescriptReactErrorBoundary(Props) {
return getErrorBoundary(React.Component);
}
var make = RescriptReactErrorBoundary;
But, it should be
// without @react.component
var make = getErrorBoundary(React.Component);
Metadata
Metadata
Assignees
Labels
No labels