Open
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?
9.7.3
What's Wrong?
When using <StrictMode>
in React 18, the event handlers (onStart
, onRest
...) don't get called.
To Reproduce
In the linked StackBlitz project, you can see in the Console that only the console.log
s in the useEffect
hook get executed. The event listeners never get called. If you disable StrictMode in index.tsx
, the event listeners get called as expected.
Expected Behaviour
Event listeners get called in StrictMode.
Link to repo
https://stackblitz.com/edit/stackblitz-starters-jphu4a?devToolsHeight=33&file=src%2FApp.tsx