RN 0.61: Animated.color causes "excessive number of pending callbacks"
See original GitHub issueHey guys, how are you?
Just updated react native version to 0.61 (rc) and now my app is crashing on some screens that use color interpolation.
We have a theme based template, so I created a function that parses hex colors using polished:
import Animated from 'react-native-reanimated'
import { parseToRgb } from 'polished'
const interpolateColors = (animation, { inputRange, outputRange }) => {
const colors = outputRange.map(parseToRgb)
const r = Animated.interpolate(animation, {
inputRange,
outputRange: colors.map(c => c.red),
extrapolate: Animated.Extrapolate.CLAMP,
})
const g = Animated.interpolate(animation, {
inputRange,
outputRange: colors.map(c => c.green),
extrapolate: Animated.Extrapolate.CLAMP,
})
const b = Animated.interpolate(animation, {
inputRange,
outputRange: colors.map(c => c.blue),
extrapolate: Animated.Extrapolate.CLAMP,
})
return Animated.color(r, g, b)
Any tips on this?
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:20
- Comments:22 (4 by maintainers)
Top Results From Across the Web
Excessive number of pending callbacks: 501. Some ...
It seems that the issue was that an async function was being executed in a loop. The loop was firing off lots of...
Read more >@react-native/normalize-color | Yarn - Package Manager
Use warnOnce for excessive number of callbacks error (0cafa0f5d1 by @janicduplessis); Include transform in OUTER_PROPS (b94438 by @migbot) ...
Read more >withTiming | React Native Reanimated
Arguments. toValue [number | string]. The target value at which the animation should conclude. It can be specified as a color ...
Read more >Untitled
Thrombin cleavage buffer recipe, Axis bank account number sample! ... Nickel colored chandeliers, Money cat cartoon, Chetan bhagat book review, Sunhee choi, ...
Read more >Why Are Our Pending Callbacks Disappearing From The ...
Pending callbacks in the 8x8 Contact Center Callback Queue are ... Cause. Cancel Callback After period was set to a shorter time period...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We just landed a PR to core that changes this warning to only fire once the first time it occurs. That might also make this issue less high severity.
I get the same error in some conditions using react-navigation 5.0.0 (unstable)