-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
template: bugThis issue might be a bugThis issue might be a bug
Description
Which react-spring target are you using?
-
@react-spring/web -
@react-spring/three -
@react-spring/native -
@react-spring/konva -
@react-spring/zdog
What version of react-spring are you using?
10.0.3
What's Wrong?
When combining a SpringValue that has loop: true and Globals.assign({skipAnimation:true}), there is an infinite loop that crashes the tab.
When setting immediate: true, this infinite loop runs every frame (with the request animation frame loop).
To Reproduce
This minimal code is enough to lock the main thread at 100% usage.
import { Globals, SpringValue } from "@react-spring/web";
Globals.assign({ skipAnimation: true });
new SpringValue(0, {
to: 1,
loop: true,
});Expected Behaviour
If we are setting skipAnimation or immediate, I think the loop parameter should be ignored to avoid this infinite loop.
Link to repo
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
template: bugThis issue might be a bugThis issue might be a bug