package com.example.playscalajsreact.model import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.html_<^._ object Top { final case class Props() { @inline def render: VdomElement = Component(this) } //implicit val reusabilityProps: Reusability[Props] = // Reusability.derive final class Backend($: BackendScope[Props, Unit]) { def render(p: Props): VdomNode = <.div } val Component = ScalaComponent.builder[Props]("Top") .renderBackend[Backend] //.configure(Reusability.shouldComponentUpdate) .build def apply() = Component(Props()) } import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.all._ object Test2 { final case class Props() //implicit val reusabilityProps: Reusability[Props] = // Reusability.derive final class Backend($: BackendScope[Props, Unit]) { def render(p: Props): VdomNode = <.div } private val Test2Component = ScalaComponent.builder[Props]("Test2") .renderBackend[Backend] //.configure(Reusability.shouldComponentUpdate) .build def apply(): VdomElement = Test2Component(Props()) } object Test3 { Test2() }