You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Modify documentation to mention this method of construction.
There are fundamentally two parts to this push. The first is to allow statically-defined view model types to work with Elmish, and the second is to allow the properties of those view model types to be statically typed.
From a discussion with @TysonMN about the advantages of statically typed properties:
When used in the context of "dot" notation in the XAML project, you will be able to get compile-time help for things like ViewModelProp.SubModel.Prop. If those were constrained to obj, you wouldn't get compile-time checking of those types.
Also XAML will warn you about type issues (number vs string, etc)
In addition, allowing statically-defined view model types will enable users to call out these view model types by name. This will allow things like data templates with explicit DataTypes set.
The text was updated successfully, but these errors were encountered:
Here is a summary of the "Static View Models" feature being added to v4.
and
types in binding vm helpers #468ViewModel<'model,'msg>
toDynamicViewModel<'model,'msg>
#469createBinding
to Binding.fs since it isn't used anywhere else #506'vm
argument toBindingData
so that the property can be statically typedBindingData
#470Remaining work (3-31-2023):
And of course:
There are fundamentally two parts to this push. The first is to allow statically-defined view model types to work with Elmish, and the second is to allow the properties of those view model types to be statically typed.
From a discussion with @TysonMN about the advantages of statically typed properties:
In addition, allowing statically-defined view model types will enable users to call out these view model types by name. This will allow things like data templates with explicit
DataType
s set.The text was updated successfully, but these errors were encountered: