comment
We are happy to announce the release of Bolero version 0.15. Bolero is a library that enables writing full-stack applications in F#, whose client side runs in WebAssembly using Blazor.
This release requires the .NET Core SDK version 3.1.402, which you can download here for Windows, OSX or Linux.
Install the latest project template with:
1
dotnet new -i Bolero.Templates::0.15.4
Features
#56: Update to Elmish 3.0. Also update the
Cmd
module to match Elmish 3's API, adding submodulesCmd.OfAuthorized
andCmd.OfJS
.- #163 Rework the HTML element reference API and add Blazor component reference:
ElementRefBinder
renamed toHtmlRef
(old name still available but obsolete)attr.bindRef
renamed toattr.ref
(old name still available but obsolete)attr.ref
taking a function removedref.Ref
renamed toref.Value
1 2 3 4 5 6
let theDiv = HtmlRef() // Used to be: let theDiv = ElementRefBinder() div [ attr.ref theDiv // Used to be: attr.bindRef theDiv on.click (fun _ -> doSomethingWith theDiv.Value) // Used to be: doSomethingWith theDiv.Ref ] []
Added
Ref<'Component>
which provides the same capability for Blazor components, using the sameattr.ref
:1 2 3 4 5 6
let theComp = Ref<MyComponent>() comp<MyComponent> [ attr.ref theComp on.click (fun _ -> doSomethingWith theComp.Value) ] []
#168: Move the module
Bolero.Html
to a separate assembly and make all of its functions inline, in order to reduce the downloaded binary size.
Fixes
#144: When a router is enabled and the user clicks a link that points to a URI not handled by the router, do navigate to this URI.
#166: Ensure that Elmish subscriptions and init commands are not run during server-side prerender.
#174: Change ShouldRender to invoke override instead of base implementation (thanks @dougquidd!)
#175: Do not render Ref until after Child Content (thanks @dougquidd!)
Happy coding!