I upgraded react to 0.14-rc1 from 0.14 beta3 , now i am seeing warnings
Warning: $c_Hello$Component(...): React component classes must extend React.Component.
but my component extending React.Component
object Hello {
@ScalaJSDefined
class Component extends ReactComponent[Unit, Unit] {
def render() = React.createElement("div",null,"hello")
}
}
no warnings in 0.14 beta3.
i think logic here is not correct ? : https://github.com/facebook/react/blob/b01af40ae64823fb963a8fa6ced3c42ae09fad55/src/renderers/shared/reconciler/ReactCompositeComponent.js#L170
in debug mode inst instanceof Component is true
warningwarns when the first argument isfalse. So inverting theinstanceofgives us what we want. What isReactComponentin your code? Is itReact.Component? Or is this something going differently in the transpilation from Scala to JS?l