Zaid-Ajaj / Feliz

A fresh retake of the React API in Fable and a collection of high-quality components to build React applications in F#, optimized for happiness
https://zaid-ajaj.github.io/Feliz/
MIT License
550 stars 83 forks source link

Use with Elmish documentation is lacking integration #601

Closed pkese closed 5 months ago

pkese commented 6 months ago

I've been trying to understand the https://zaid-ajaj.github.io/Feliz/#/Feliz/UseWithElmish example.

Unfortunately there are a few lines missing ... the Elmish Program.mkProgram stuff down at the bottom.

It would be really nice if somebody added those few missing lines to that example to make if complete.

MangelMaxime commented 6 months ago

This section is trying to say that Feliz is compatible with any normal Elmish application which use React as the rendering layer.

You can use any Elmish application and add Feliz to it. Feliz is a replacement for Fable.React

  • will Elmish.React work with Feliz

Yes

  • are there any particlularities with Hmr

Like with any Elmish application you need to use Fable.Elmish.HMR you don't need to follow any particular convention when using HMR with Elmish we are much more forgiving than hot-refresh from React.

pkese commented 6 months ago

Thanks @MangelMaxime

I managed to figure it out myself in the meanwhile... it's just that it took me time and effort to do so.

So I added a pull request, to save time and help other people who might wish to achieve the same result