DEV Community

Discussion on: Using lit-html with F#

Collapse
 
miastometr profile image
Paweł Stadnicki

This is insanely good writing. Many thanks for that!

I'm considering to mix this Lit libraries for a project that has html template/theme from stock market (created with bulma). So I may use Lit'ish for most of the html from that theme leaving it as it is (as it is ridiculusly big html!) binding F# only in few places ... and use regular Feliz for components that require o lot of logic (incuding styles).

Is this resonable in your opinion, do I understand correctly the benefits of Lit ?

Collapse
 
tunaxor profile image
Angel Daniel Munoz Gonzalez

That can be a really good use case, porting an existing website which uses HTML to F# + Lit

if it's just standard HTML for the most part the transition will be putting the HTML inside interpolated strings, and a few places where JS is used F# can be easily swaped in.

We had a few issues with the Feliz based DSL so that might actually go away before the 1.0 release hits, I'm personally looking to enable Sutil (Github) as the type safe web standards compatible Fable framework and I will write a piece on it again soon, but in the mean time you can indeed use full lit-html