Closed mattgallagher92 closed 5 months ago
An alternative might be to instead upgrade this to work with React 18, but we should probably wait for SAFE Stack to do that first.
We now have SAFE 5 and there's at least one issue on this repo about upgrading the deps - can this be closed?
Currently, the following doesn't work:
dotnet new SAFE
(v4.2.0)dotnet tool restore
dotnet femto install Feliz.AgGrid src/Client
It results in the following error:
The problem seems to be that this upgrades Feliz to v2, which relies on Fable.React.Types v18 (NuGet), which in turn relies on React 18 (npm), while Feliz.AgGrid relies on ag-grid-react v25 (npm), which in turn relies on React 16 or 17 (npm).
To get around this problem, we need to ensure that there is no dependency on Fable.React.Types v18. This can be achieved by pinning Feliz to v1 and Fable.React (which Feliz v1 relies on) to v7. We have to pin Fable.React to v7, because v8 relies on React 18, and v9 relies on Fable.React.Types v18 (relies on React 18 (npm)).
This needs to take effect in the NuGet package, which I think probably means adding Fable.React to ./src/Client/paket.references. It's not enough to restrict just Feliz, because Feliz v1 specifies Fable.React >= 7.4.0, so allows Fable.React 8 or 9.