Open zelenij opened 3 years ago
Hi @zelenij, thanks for filing the issue.
How exactly did you install react-spring
intro your project? Just using npm install react-sprint
will always bring in the latest version which a binding might not necessarily support. I would highly recommend you use Femto to install the package as follows:
femto install Elmish.AnimatedTree
And it will resolve the matching react-spring
package used by this binding.
You are right, I installed the package directly using yarn. So I uninstalled react-spring and then used femto to install the AnimatedTree package, which in turn pulled react-spring 8.0.1, so all good. But now I'm getting this exception, when trying to display a very simple tree with about 10 nodes. Any thoughts?
Never seen this error before to be honest. I'll need to investigate
Hi - This error only manifests with fable-library >= 3, it seems. It fails in fable-library/Utils.js in ObjectRef.id, with the error 'WeakMap key must be an object', no matter what type is used as a Key in AnimatedTree. I think it must be an issue with fable-library. A workaround I've found is to comment out |> List.distinctBy fst in buildProps.
From here - https://react-spring.io/changelog :
But this binding doesn't seem to be aware of this, since it hasn't been updated for a couple of years :)
I suspect the later versions of react-spring removed the module altogether, since I'm getting this now:
From yarn.lock: