![codecov](https://camo.githubusercontent.com/f772b5d97e50fd78a1bcfea70c27dcc5370a7f39fbe5a776b6dc6d6c61253e0f/68747470733a2f2f636f6465636f762e696f2f67682f7578736f66742f4655492f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d5a484d35475351315437)
- Declarative
- Describes how the UI should look like with F#, let the framework figure out what changes to the UI need to be made
- Hot Reload
- Model and output of View function can be serialised to JSON
- Performant
- Avoid Virtual DOM and diffing by taking a Reactive approach
- Scalable
- Able to decompose big application to small components
- Multi Platform
- The following platforms should be supported through modular bindings
type Model =
{ Counter: int oval
Items: int ocol }
let init () =
{ Counter = oval 0
Items = ocol [1; 2; 3] }
let view () =
let model = init ()
StackPanel {
TextBlock {
let txt = (model.Counter |> Ov.map string)
txt
}
Button {
onClick (fun _ _ ->
model.Items.Add (model.Items.Count + 1)
model.Counter.Update (fun v -> v + 1))
"+"
}
Button {
onClick (fun _ _ ->
model.Items.Remove (model.Items.Count - 1)
model.Counter.Update (fun v -> v - 1))
"-"
}
Button {
onClick (fun _ _ ->
model.Items.Clear()
model.Counter.Update (fun _ -> 0))
"reset"
}
let isEven = model.Counter |> Ov.map (fun i -> (i % 2) = 0)
If (isEven) {
TextBlock { "even" }
}
Else (isEven) {
TextBlock { "odd" }
}
for i in model.Items do
for j in model.Items do
TextBlock { $"item-{i}-{j}" }
}
![FOSSA Status](https://camo.githubusercontent.com/b0203c3d947f30fb5cc33b6a4b1cd6f8f53f891441c585d332d005ac6e9ecbf3/68747470733a2f2f6170702e666f7373612e636f6d2f6170692f70726f6a656374732f6769742532426769746875622e636f6d2532467578736f66742532464655492e7376673f747970653d6c61726765)