Based on a conversation with @vjeux:
I wrote
constructor(props) {
return {
something: false
}
}
instead of
constructor(props) {
super(props);
this.state = {
something: false
}
}
and the error was super confusing, it told me that render is not defined on the component, which didn't make sense since I returned it!
We can fix this to show a different message if type has .prototype.isReactComponent but constructor() gave us something without a render method.