-
Add ability to create JsFnComponents from Scala fns (without boxing props). New methods:
// High-level JsFnComponent.fromScala [P <: js.Object](props => VdomElement) JsFnComponent.fromScala.withChildren[P <: js.Object]((props, children) => VdomElement) JsFnComponent.fromScala.justChildren (children => VdomElement) JsFnComponent.fromScala.byName ( => VdomElement) JsFnComponent.fromScala.const ( VdomElement) // Low-level JsFnComponent.fromScala.generic[P <: js.Object, C <: Children](P with RAW.PropsWithChildren => VdomElement) JsFnComponent.fromJsFn [P <: js.Object, C <: Children](js.Function1[P with raw.Children, raw.React.Element])
-
Add ability to turn any component into a new
JsFnComponent
one that wraps it by calling.toJsComponent
. The component's props either need to be a subtype ofjs.Object
or a known singleton likeUnit
orNull
.
(Full example in link below.) -
Added instructions and examples for using Scala components in JS and JSX to the Interoperability doc.
-
Bugfix: In
Broadcaster
in extra, theunregister
function would actually make the subject the sole listener rather than remove it. Unfortunately there was a bug in μTest which let this slip through the gaps. Versions affected: 1.2.[0-1].
If you like what I do —my OSS libraries, my contributions to other OSS libs, my programming blog— and you'd like to support me, more content, more lib maintenance, please become a patron! I do all my OSS work unpaid so showing your support will make a big difference.