raquo / laminar-full-stack-demo

Fully working client + server, dev + prod setup for Scala.js development, showcasing a bunch of Laminar & Scala.js patterns.
https://demo.laminar.dev
MIT License
50 stars 11 forks source link

Improve trait WebComponent to return ReactiveHtmlElement[Ref] instead of HtmlElement in apply() and of() #1

Closed sven42 closed 1 year ago

sven42 commented 1 year ago

Returning the specific type makes this possible:

val comp = SpecialWebComponent("e.g.")
comp.ref.beSpecial()
raquo commented 1 year ago

Good fix, thank you!