(There is an issue - UI #144 about this already, just cross-referenced it with this topic.) Event handlers from templates now come with a more stringent signature, parameterized by Templating.Runtime.Server.TemplateEvent<'V, 'Args>, where the inner 'V is the data model (collection of bound reactive values) for the template.

When you have a local generic function such as let click _ = () you run into a limitation in F# quotations as manifested in your snippet. One solution is to move these inner functions to top-level inside a module, another (although not convenient) is to annotate them with the template model they belong to.

I would also argue that we should re-introduce event handlers that use the "old" signature (with just the DOM element and event arguments), not sure what was the reason for not leaving them in place as well - but I suspect it may have been type provider/code generation-related. Keep an eye on both topics for the time being, and feel free to dig in the code deeper to see where this could be addressed - thanks!

By on 12/28/2017 5:27 AM ()