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
544 stars 81 forks source link

Extract ReactElement to another library and replace Fable.React dependency #508

Closed alfonsogarciacaro closed 2 years ago

alfonsogarciacaro commented 2 years ago

This is something we discussed in the past, I tried to do it in #285, but we didn't merge at the end because moving interfaces to another .dll broke .NET builds. If you're planning to release Feliz 2 @Zaid-Ajaj, maybe this can be a good opportunity to try it again. The idea is:

  1. Extract Fable.React types (at a minimum ReactElement) to another library, say Fable.React.Types, and publish it independently.
  2. Publish a new Fable.React version that depends on this library, but probably after that we can deprecate it.
  3. Make Feliz 2 depend on Fable.React.Types but no Fable.React. This will still make Feliz elements compatible with Fable.React, but it will avoid the dependency when not needed.
  4. Other libraries that basically only need ReactElement can do the same, like elmish-react and the upcoming Feliz.JSX.React.

If this is OK with you I can make the Fable.React split and send a new PR 👍

Zaid-Ajaj commented 2 years ago

That sounds great @alfonsogarciacaro 🙏 Feliz v2 sounds like a good candidate for this!