fable-compiler / fable-react

Fable bindings and helpers for React and React Native
MIT License
273 stars 67 forks source link

Npm packages metadata #169

Closed Zaid-Ajaj closed 4 years ago

Zaid-Ajaj commented 5 years ago

Packages validated with Femto locally, using version constraint >= 16.8.0 because that is where React shipped hooks, downstream package Fable.Elmish.React will need an update too along with Fable.ReactNative because they both depend on this package

@alfonsogarciacaro @forki @MangelMaxime

MangelMaxime commented 5 years ago

Here we are hitting a problem.

react-native doesn't need react-dom in order to works.

See package.json from SAFE-Nightwatch

MangelMaxime commented 5 years ago

For me Fable.ReactDom.fs should be in it's own package.

This changes is following the same philosophy applied to Fable.Browser.*, Fulma, etc.

Zaid-Ajaj commented 5 years ago

I was thinking the exact same thing, the hierarchy should be

Fable.Elmish.React
  |
  | -- Fable.ReactDom
           |
           | -- Fable.React

Same goes for Fable.ReactNative, but I am not sure if Fable.Elmish.React is specific to Fable.ReactDom or just Fable.React, what do you think?

MangelMaxime commented 5 years ago

Fable.Elmish.React is supporting both at the same time:

Capture d’écran 2019-07-03 à 13 41 23
MangelMaxime commented 5 years ago

Just to be more precise, Fable.Elmish.React use:

Zaid-Ajaj commented 5 years ago

Yeah I just read the source code as well, it is a real mess 😓 there should be a separate Elmish package for react native applications, the hierarchies become the following:

Web Applications

Fable.Elmish.React
  |
  | -- Fable.ReactDom (react-dom >= 16.8.0)
         |
         | -- Fable.React (react >= 16.8.0)

React Native Applications

Fable.Elmish.ReactNative
  |
  | -- Fable.ReactNative (react-native >= 0.57)
         |
         | -- Fable.React  (react >= 16.8.0)
alfonsogarciacaro commented 4 years ago

I think this is a good idea but it's a breaking change for people depending on Fable.React without Elmish, we should release it as a new major version.

MangelMaxime commented 4 years ago

I think this is a good idea but it's a breaking change for people depending on Fable.React without Elmish, we should release it as a new major version.

Sure, I will prepare the packages and release them.

MangelMaxime commented 4 years ago

I am closing in favour of #171