fable-react icon indicating copy to clipboard operation
fable-react copied to clipboard

WIP: Repo split

Open MangelMaxime opened this issue 6 years ago • 3 comments

Follow up on https://github.com/fable-compiler/fable-react/pull/169

The package split of Fable.React is ready, there is already a beta version of Fable.React.Dom published.

I am waiting for a solution to Fable.Elmish.React split before realising everything to stable.

MangelMaxime avatar Jul 24 '19 09:07 MangelMaxime

This doesn't look ready!? because I see a lot of react-dom specific stuff still in here like Fable.React.Standard.fs, Props, Extensions etc... Now if Fable.ReactNative depends on Fable.React, they will have access to div and h1 but they can't use them because they are react-dom specific..

Zaid-Ajaj avatar Jul 24 '19 13:07 Zaid-Ajaj

Ah yes, indeed.

I thought that react-native was accepting the same components as the one from the browser my bad.

I will update the PR.

MangelMaxime avatar Jul 24 '19 14:07 MangelMaxime

I gave this split a try locally but it was soo messy because of the SSR stuff everywhere using compiler directives to generate html elements on the server, but now these stuff have to go to fable-react-dom or their own library?!

Zaid-Ajaj avatar Jul 24 '19 14:07 Zaid-Ajaj

@MangelMaxime IIRC we never did the react/react-dom split at the end. Should we try to do it now that we are also splitting the types and the helpers?

alfonsogarciacaro avatar Sep 23 '22 01:09 alfonsogarciacaro

@alfonsogarciacaro Because we are already doing a breaking changes with Fable.React.Types, indeed I think it would be a good opportunity to split the packages.

MangelMaxime avatar Sep 23 '22 06:09 MangelMaxime

What was the main motivation to remove react-dom btw? For cleanness or to avoid Femto using warnings in projects that don't need react-dom (like react native projects)?

alfonsogarciacaro avatar Sep 26 '22 13:09 alfonsogarciacaro

I think it was to have a clean binding in term of dependencies.

For example, native project doesn't need react-dom and it would probably also make it cleaner which package is responsible for what. As before everything was mixed together between F# specific code, bindings for the React.Dom or for React itself

MangelMaxime avatar Sep 26 '22 21:09 MangelMaxime

Superseded by #234

alfonsogarciacaro avatar Sep 27 '22 11:09 alfonsogarciacaro