Error: outputRange cannot include undefined, from useValues
See original GitHub issueThe code is giving error after using useValues
const [show, setShow] = useState(true);
const clock = useClock([]);
const startAnimation = new Value(1);
const [startTime, from, to] = useValues([0, 0, 0], []);
const endTime = add(startTime, duration);
const opacity = interpolate(clock, {
inputRange: [startTime, endTime],
outputRange: [from, to],
extrapolate: Extrapolate.CLAMP,
});
Error: Invariant Violation: outputRange cannot be undefined
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top Results From Across the Web
invariant violation: outputRange cannot include #ffffff. (#ffffff ...
I get this error even I change: inputIndex ...
Read more >Tutorial From Start React Native Website - Morioh
If I use useValues with an array, I get an error: outputRange cannot include undefined ,. const [startTime, from, to] = useValues(0, 0,...
Read more >C++ Standard Library Unresolved Issues - open-std.org
It's not completely clear to me whether examples can be constructed that exhibit this problem, and don't have undefined behavior.
Read more >MELSEC iQ-R Channel Isolated Digital-Analog Converter ...
CPU module cannot detect any error. To ensure safety operation in such a case, provide a safety mechanism or a fail-safe circuit external...
Read more >C++ Standard Library Active Issues List
Provide a brief discussion of the problem you wish to correct. ... I can't find anything in section 27 that prohibits such values...
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 Free
Top 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
I’ve just come across this too, reproduced here: https://snack.expo.io/@pbcodes/insane-scones
Changing the
useValues([0, 0, 0, 0])
touseValues(0, 0, 0, 0)
works. As @francosta said, the docs are out of date.It’s not changed in docs, but v14 change implementation. See here https://github.com/wcandillon/react-native-redash/releases/tag/v14.0.0 So you should have
const [startTime, from, to] = useValues(0, 0, 0);
From what I see in docs theuseValues
didn’t accept second parametr even before.