-
-
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
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
What version of react-spring are you using?
9.7.5
What's Wrong?
UseSpring() is not firing in NextJS 14 dev environment.
Using the first example from the docs:
https://codesandbox.io/p/devbox/bold-andras-ymxghg
To Reproduce
Use the NextJS 14 Starter, create a simple component with useSpring, run npm run dev
Expected Behaviour
The element should animate.
Link to repo
Metadata
Metadata
Assignees
Labels
template: bugThis issue might be a bugThis issue might be a bug
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
hq-aw commentedon Mar 12, 2025
Apparently also the case in NextJS 13 #2146
Stan-Stani commentedon Mar 14, 2025
In Next 14 I was seeing a looped animation not start unless it was rerendered. I used a useEffect to toggle the
pause
spring prop once hydration (mounting) was complete and that made the animation start correctly even after page hard reload.ETA: Ha, now it doesn't loop when I do a client side navigation back to the page though.