three and web are incompatible
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 29.1k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
🐛 Bug Report
react-spring/web is not working when a @react-spring/three happens before, unless both is happeing in the same file. From here on this is just wild guessing from my side why this happens.
I am using react spring for a web and a threejs context. Respectivly importing both with
import { animated, useTransition, config, useSpring } from "@react-spring/web";
// or
import { useSpring, animated, config } from "@react-spring/three";
To Reproduce
Import a animated three component and a animated web component. The useSpring web component stops working:

Expected behavior
Importing react-spring/three and react-spring/web both enable working springs no matter if imported from different files.
Link to repro (highly encouraged)
Working animations: https://codesandbox.io/s/single-file-69el5?file=/src/App.js
Non Working example: https://codesandbox.io/s/multi-file-11oph?file=/src/App.js
Environment
react-springv9.2.3reactv17.0.2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the linked single-file and multi-file CodeSandbox reproductions and compare imports from react-spring/web and react-spring/three. Trace the package entry points involved in those imports and verify that web springs still work when the three component is imported first; done means both reproductions animate correctly regardless of file boundaries or import order.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react, three.js
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100