I have written a Higher Order Component:
import React from \'react\';
const NewHOC = (PassedComponent) => {
return class extends React.Component {
In my case i forgot to add the () after the function name inside the render function of a react component
public render() {
let ctrl = (
<>
{this.renderView}
>
);
return ctrl;
};
private renderView() : JSX.Element {
// some html
};
Changing the render method, as it states in the error message to
{this.renderView()}
fixed the problem