fable-compiler / fable-react

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

Last Fable.React upgrade breaks my code #232

Open OnurGumus opened 1 year ago

OnurGumus commented 1 year ago
image

I guess screenshot says all. Any ideas?

OnurGumus commented 1 year ago

I was using Lit sample by the way

alfonsogarciacaro commented 1 year ago

We're trying to split React types and helpers in two different libraries (see discussion). The idea is we can have different React APIs (original React, Feliz, incoming JSX, etc..) to be compatible with each other without having to depend on the full Fable.React. But unfortunately this breaks code if you're depending on a library that hasn't been updated, because F# doesn't support type forwarding.

What are the other React dependencies in your project? In any case you probably don't need to update right now.

OnurGumus commented 1 year ago

I understand. In that case I will stick to older version. Feel free to close the issue if you will.

kerams commented 1 year ago

Does this mean we have to pin ~> 8 until every single library we're referencing has switched?

kerams commented 1 year ago

And conversely, if I create a new bindings package and use Fable.React.Types, I can't use it if I also reference packages that haven't switched?

kerams commented 1 year ago

Would it be possible to release a new beta of Elmish.React which uses Fable.React.Types, so that Fulma and its extensions could in turn upgrade to it as well? That would unblock the upgrade path to Fable.React 9 (and Fable 4) in my project at least.

cc @MangelMaxime

alfonsogarciacaro commented 1 year ago

And conversely, if I create a new bindings package and use Fable.React.Types, I can't use it if I also reference packages that haven't switched?

Yes, this is very unfortunate because F# doesn't support type forwarding. The funny thing is it does work in Fable because we always compile the sources, but having errors in the IDE is not nice. Let's try to update all packages quickly so we can make the pain short-lived :)

Would it be possible to release a new beta of Elmish.React which uses Fable.React.Types, so that Fulma and its extensions could in turn upgrade to it as well? That would unblock the upgrade path to Fable.React 9 (and Fable 4) in my project at least.

Elmish.React has just been released :tada: