Skip to content

Instantly share code, notes, and snippets.

@trepidacious
Created December 24, 2017 11:39
Show Gist options
  • Select an option

  • Save trepidacious/107352f925d736bea5989a156138beaa to your computer and use it in GitHub Desktop.

Select an option

Save trepidacious/107352f925d736bea5989a156138beaa to your computer and use it in GitHub Desktop.
def stringViewThing = ReactComponentB[String]("StringViewThing")
.render_P(s => <.div(s): ReactElement)
.configure(Reusability.shouldComponentUpdateWithOverlay)
.componentWillUnmount(_ => Callback{println("StringViewThing unmounted! Again!")})
.build
val streetView = cursorView[Unit, Street, StreetDelta, Unit]("StreetView") { c => {
val r = <.div(
^.paddingTop := "20px",
^.backgroundColor := MaterialColor.Amber.a100,
stringViewThing.withKey("stringOfNumber")(c.model.number.toString)//,
)
console.log(r)
r
}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment