File tree Expand file tree Collapse file tree 16 files changed +127
-96
lines changed Expand file tree Collapse file tree 16 files changed +127
-96
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @react-spring/core ' : patch
3+ ---
4+
5+ Fix issue with Jest and legacy React apps using useTransition
Original file line number Diff line number Diff line change 1+ {
2+ "mode" : " pre" ,
3+ "tag" : " beta" ,
4+ "initialVersions" : {
5+ "@react-spring/demo" : " 1.0.0" ,
6+ "@react-spring/docs" : " 2.0.0" ,
7+ "@react-spring/animated" : " 10.0.2" ,
8+ "@react-spring/core" : " 10.0.2" ,
9+ "eslint-config-react-spring" : " 0.0.1" ,
10+ "@react-spring/parallax" : " 10.0.2" ,
11+ "@react-spring/rafz" : " 10.0.2" ,
12+ "react-spring" : " 10.0.1" ,
13+ "@react-spring/shared" : " 10.0.2" ,
14+ "@react-spring/types" : " 10.0.2" ,
15+ "@react-spring/konva" : " 10.0.2" ,
16+ "@react-spring/native" : " 10.0.2" ,
17+ "@react-spring/three" : " 10.0.2" ,
18+ "@react-spring/web" : " 10.0.2" ,
19+ "@react-spring/zdog" : " 10.0.2"
20+ },
21+ "changesets" : [
22+ " khaki-rice-peel"
23+ ]
24+ }
Original file line number Diff line number Diff line change 11{
22 "name" : " @react-spring/animated" ,
3- "version" : " 10.0.2 " ,
3+ "version" : " 10.0.3-beta.0 " ,
44 "description" : " Animated component props for React" ,
55 "module" : " ./dist/react-spring_animated.legacy-esm.js" ,
66 "main" : " ./dist/cjs/index.js" ,
5252 "pack" : " yarn pack"
5353 },
5454 "dependencies" : {
55- "@react-spring/shared" : " ~10.0.2 " ,
56- "@react-spring/types" : " ~10.0.2 "
55+ "@react-spring/shared" : " ~10.0.3-beta.0 " ,
56+ "@react-spring/types" : " ~10.0.3-beta.0 "
5757 },
5858 "peerDependencies" : {
5959 "react" : " ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
Original file line number Diff line number Diff line change 11{
22 "name" : " @react-spring/core" ,
3- "version" : " 10.0.2 " ,
3+ "version" : " 10.0.3-beta.0 " ,
44 "module" : " ./dist/react-spring_core.legacy-esm.js" ,
55 "main" : " ./dist/cjs/index.js" ,
66 "types" : " ./dist/react-spring_core.modern.d.mts" ,
5555 "pack" : " yarn pack"
5656 },
5757 "dependencies" : {
58- "@react-spring/animated" : " ~10.0.2 " ,
59- "@react-spring/shared" : " ~10.0.2 " ,
60- "@react-spring/types" : " ~10.0.2 "
58+ "@react-spring/animated" : " ~10.0.3-beta.0 " ,
59+ "@react-spring/shared" : " ~10.0.3-beta.0 " ,
60+ "@react-spring/types" : " ~10.0.3-beta.0 "
6161 },
6262 "peerDependencies" : {
6363 "react" : " ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
Original file line number Diff line number Diff line change @@ -438,11 +438,13 @@ export function useTransition(
438438
439439 const props = elem ?. props ?? { }
440440
441- if ( isLegacyReact ) {
442- props . ref = elem . ref
443- }
441+ const elemRef = isLegacyReact ? elem ?. ref : props ?. ref
444442
445- return elem && elem . type ? < elem . type key = { key } { ...props } /> : elem
443+ return elem && elem . type ? (
444+ < elem . type { ...props } key = { key } ref = { elemRef } />
445+ ) : (
446+ elem
447+ )
446448 } ) }
447449 </ >
448450 )
Original file line number Diff line number Diff line change 11{
22 "name" : " @react-spring/parallax" ,
3- "version" : " 10.0.2 " ,
3+ "version" : " 10.0.3-beta.0 " ,
44 "module" : " ./dist/react-spring_parallax.legacy-esm.js" ,
55 "main" : " ./dist/cjs/index.js" ,
66 "types" : " ./dist/react-spring_parallax.modern.d.mts" ,
5252 "test" : " vite serve ./test"
5353 },
5454 "dependencies" : {
55- "@react-spring/shared" : " ~10.0.2 " ,
56- "@react-spring/web" : " ~10.0.2 "
55+ "@react-spring/shared" : " ~10.0.3-beta.0 " ,
56+ "@react-spring/web" : " ~10.0.3-beta.0 "
5757 },
5858 "peerDependencies" : {
5959 "react" : " ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" ,
Original file line number Diff line number Diff line change 11{
22 "name" : " @react-spring/rafz" ,
3- "version" : " 10.0.2 " ,
3+ "version" : " 10.0.3-beta.0 " ,
44 "description" : " react-spring's fork of rafz one frameloop to rule them all" ,
55 "module" : " ./dist/react-spring_rafz.legacy-esm.js" ,
66 "main" : " ./dist/cjs/index.js" ,
Original file line number Diff line number Diff line change 11{
22 "name" : " react-spring" ,
3- "version" : " 10.0.1 " ,
3+ "version" : " 10.0.2-beta.0 " ,
44 "module" : " ./dist/react-spring.legacy-esm.js" ,
55 "main" : " ./dist/cjs/index.js" ,
66 "types" : " ./dist/react-spring.modern.d.mts" ,
4444 " Josh Ellis (https://github.com/joshuaellis)"
4545 ],
4646 "dependencies" : {
47- "@react-spring/core" : " ~10.0.1 " ,
48- "@react-spring/konva" : " ~10.0.1 " ,
49- "@react-spring/native" : " ~10.0.1 " ,
50- "@react-spring/three" : " ~10.0.1 " ,
51- "@react-spring/web" : " ~10.0.1 " ,
52- "@react-spring/zdog" : " ~10.0.1 "
47+ "@react-spring/core" : " ~10.0.3-beta.0 " ,
48+ "@react-spring/konva" : " ~10.0.3-beta.0 " ,
49+ "@react-spring/native" : " ~10.0.3-beta.0 " ,
50+ "@react-spring/three" : " ~10.0.3-beta.0 " ,
51+ "@react-spring/web" : " ~10.0.3-beta.0 " ,
52+ "@react-spring/zdog" : " ~10.0.3-beta.0 "
5353 },
5454 "peerDependencies" : {
5555 "react" : " ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" ,
Original file line number Diff line number Diff line change 11{
22 "name" : " @react-spring/shared" ,
3- "version" : " 10.0.2 " ,
3+ "version" : " 10.0.3-beta.0 " ,
44 "description" : " Globals and shared modules" ,
55 "module" : " ./dist/react-spring_shared.legacy-esm.js" ,
66 "main" : " ./dist/cjs/index.js" ,
4545 " Josh Ellis (https://github.com/joshuaellis)"
4646 ],
4747 "dependencies" : {
48- "@react-spring/rafz" : " ~10.0.2 " ,
49- "@react-spring/types" : " ~10.0.2 "
48+ "@react-spring/rafz" : " ~10.0.3-beta.0 " ,
49+ "@react-spring/types" : " ~10.0.3-beta.0 "
5050 },
5151 "peerDependencies" : {
5252 "react" : " ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
Original file line number Diff line number Diff line change 11{
22 "name" : " @react-spring/types" ,
3- "version" : " 10.0.2 " ,
3+ "version" : " 10.0.3-beta.0 " ,
44 "description" : " Internal package with TypeScript stuff" ,
55 "module" : " ./dist/react-spring_types.legacy-esm.js" ,
66 "main" : " ./dist/cjs/index.js" ,
You can’t perform that action at this time.
0 commit comments