-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Cannot animate to the given "to" prop, because the current value has a different type" #867
Comments
Cannot animate to the given "to" prop, because the current value has a different type
Found out it was this particular line: The type comparison when you animate between string values becomes a The workaround is to not use string types at all, but this definitely is not the ideal scenario. |
We had to downgrade to 9.0.0-beta.34 due to this bug. Sadly it appears in all browsers. It also makes IE11 crash due to the flooding of error when the console is open, but it's IE... so I guess it would have been expected. |
@aleclarson - do you have any ETA the fix? I'm asking because it's flooding our Sentry instance badly everyday. |
…etNodeType" Fixes pmndrs#867 Not sure why that condition existed in the first place...
…etNodeType" Fixes #867 Not sure why that condition existed in the first place...
…etNodeType" Fixes #867 Not sure why that condition existed in the first place...
Should be fixed in |
@aleclarson I'm still seeing the error with
Will try to provide a way to repro. I have a lot of animations going on so isn't clear what started it or is causing it as the error originates from |
Update: Believe I resolved my issue — I was using a For others, the proper way to set a ref for measuring is to use |
…etNodeType" Fixes #867 Not sure why that condition existed in the first place...
🐛 Bug Report
Basically on every Trail animation init there's an error thrown somewhere deep in the library (either index.js or SpringValue.ts), even though everything animates properly.
The error being thrown is
Cannot animate to the given "to" prop, because the current value has a different type
. Can be found in both SpringValue.ts:606 and index.js:1213To Reproduce
Create a Trail animation on a page and in the console you can see that there are multiple errors.
Expected behavior
Well, obviously not having that error.
Link to repro (highly encouraged)
https://codesandbox.io/s/restless-pine-nkdeb (open Chrome's console, because the built-in is not showing it).
Environment
react-spring
v9.0.0-canary.808.11.4be2ac3react
v16.10.2The text was updated successfully, but these errors were encountered: