elmish / elmish

Elm-like abstractions for F# apps
https://elmish.github.io/elmish/
Other
840 stars 84 forks source link

Proposal: port Elm's virtual dom to work with Feliz #274

Closed reinux closed 1 year ago

reinux commented 1 year ago

Not too sure whether this should be in the Feliz repo or this one, but I'm looking at the world famous Elm Virtual Dom repo, and it actually looks quite manageable: a couple thousand lines of js and a few hundred lines of Elm to interface with it.

Combined with something like Sutil, we could do away with Fable.Elmish's React dependency for many projects.

et1975 commented 1 year ago

Go nuts, but this is not the repo for it.

reinux commented 1 year ago

Would it be the Feliz repo?

I'm not entirely sure where it would hook into.

MangelMaxime commented 1 year ago

@reinux Feliz is not the repo either because Feliz aims to provide bindings for React and its ecosystem.

The place for such a project is a new repository, which means inside of your own repository or an org that you own.

kspeakman commented 1 year ago

@reinux The Elmish library is independent of the view technology. Usually there is the library that houses the view technology like Fable.React(.Types now?). And an integration library marries the two. Like Fable.Elmish.React or Feliz. Feliz also layers its own syntax on top of Fable.React.

I believe there was a Virtual Dom implementation before that plugged into Elmish. But it was abandoned since React exists.

A virtual dom implementation would be nice, especially if it were more Elm-like in that you don't have to pass dispatch around nor use anonymous functions for obvious JS events. e.g. Elm: OnInput FieldName vs OnInput (fun e -> dispatch (FieldName e.Value)). But it would be a large undertaking.