Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/khaki-rice-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@react-spring/core': patch
---

Fix issue with Jest and legacy React apps using useTransition
24 changes: 24 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"mode": "pre",
"tag": "beta",
"initialVersions": {
"@react-spring/demo": "1.0.0",
"@react-spring/docs": "2.0.0",
"@react-spring/animated": "10.0.2",
"@react-spring/core": "10.0.2",
"eslint-config-react-spring": "0.0.1",
"@react-spring/parallax": "10.0.2",
"@react-spring/rafz": "10.0.2",
"react-spring": "10.0.1",
"@react-spring/shared": "10.0.2",
"@react-spring/types": "10.0.2",
"@react-spring/konva": "10.0.2",
"@react-spring/native": "10.0.2",
"@react-spring/three": "10.0.2",
"@react-spring/web": "10.0.2",
"@react-spring/zdog": "10.0.2"
},
"changesets": [
"khaki-rice-peel"
]
}
6 changes: 3 additions & 3 deletions packages/animated/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-spring/animated",
"version": "10.0.2",
"version": "10.0.3-beta.0",
"description": "Animated component props for React",
"module": "./dist/react-spring_animated.legacy-esm.js",
"main": "./dist/cjs/index.js",
Expand Down Expand Up @@ -52,8 +52,8 @@
"pack": "yarn pack"
},
"dependencies": {
"@react-spring/shared": "~10.0.2",
"@react-spring/types": "~10.0.2"
"@react-spring/shared": "~10.0.3-beta.0",
"@react-spring/types": "~10.0.3-beta.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
Expand Down
8 changes: 4 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-spring/core",
"version": "10.0.2",
"version": "10.0.3-beta.0",
"module": "./dist/react-spring_core.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_core.modern.d.mts",
Expand Down Expand Up @@ -55,9 +55,9 @@
"pack": "yarn pack"
},
"dependencies": {
"@react-spring/animated": "~10.0.2",
"@react-spring/shared": "~10.0.2",
"@react-spring/types": "~10.0.2"
"@react-spring/animated": "~10.0.3-beta.0",
"@react-spring/shared": "~10.0.3-beta.0",
"@react-spring/types": "~10.0.3-beta.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
Expand Down
10 changes: 6 additions & 4 deletions packages/core/src/hooks/useTransition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
// Return a `SpringRef` if a deps array was passed.
const ref = useMemo(
() => (propsFn || arguments.length == 3 ? SpringRef() : void 0),
[]

Check warning on line 94 in packages/core/src/hooks/useTransition.tsx

View workflow job for this annotation

GitHub Actions / Style Checks

React Hook useMemo has a missing dependency: 'propsFn'. Either include it or remove the dependency array
)

// Every item has its own transition.
Expand Down Expand Up @@ -438,11 +438,13 @@

const props = elem?.props ?? {}

if (isLegacyReact) {
props.ref = elem.ref
}
const elemRef = isLegacyReact ? elem?.ref : props?.ref

return elem && elem.type ? <elem.type key={key} {...props} /> : elem
return elem && elem.type ? (
<elem.type {...props} key={key} ref={elemRef} />
) : (
elem
)
})}
</>
)
Expand Down
6 changes: 3 additions & 3 deletions packages/parallax/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-spring/parallax",
"version": "10.0.2",
"version": "10.0.3-beta.0",
"module": "./dist/react-spring_parallax.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_parallax.modern.d.mts",
Expand Down Expand Up @@ -52,8 +52,8 @@
"test": "vite serve ./test"
},
"dependencies": {
"@react-spring/shared": "~10.0.2",
"@react-spring/web": "~10.0.2"
"@react-spring/shared": "~10.0.3-beta.0",
"@react-spring/web": "~10.0.3-beta.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/rafz/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-spring/rafz",
"version": "10.0.2",
"version": "10.0.3-beta.0",
"description": "react-spring's fork of rafz one frameloop to rule them all",
"module": "./dist/react-spring_rafz.legacy-esm.js",
"main": "./dist/cjs/index.js",
Expand Down
14 changes: 7 additions & 7 deletions packages/react-spring/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-spring",
"version": "10.0.1",
"version": "10.0.2-beta.0",
"module": "./dist/react-spring.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring.modern.d.mts",
Expand Down Expand Up @@ -44,12 +44,12 @@
"Josh Ellis (https://github.com/joshuaellis)"
],
"dependencies": {
"@react-spring/core": "~10.0.1",
"@react-spring/konva": "~10.0.1",
"@react-spring/native": "~10.0.1",
"@react-spring/three": "~10.0.1",
"@react-spring/web": "~10.0.1",
"@react-spring/zdog": "~10.0.1"
"@react-spring/core": "~10.0.3-beta.0",
"@react-spring/konva": "~10.0.3-beta.0",
"@react-spring/native": "~10.0.3-beta.0",
"@react-spring/three": "~10.0.3-beta.0",
"@react-spring/web": "~10.0.3-beta.0",
"@react-spring/zdog": "~10.0.3-beta.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-spring/shared",
"version": "10.0.2",
"version": "10.0.3-beta.0",
"description": "Globals and shared modules",
"module": "./dist/react-spring_shared.legacy-esm.js",
"main": "./dist/cjs/index.js",
Expand Down Expand Up @@ -45,8 +45,8 @@
"Josh Ellis (https://github.com/joshuaellis)"
],
"dependencies": {
"@react-spring/rafz": "~10.0.2",
"@react-spring/types": "~10.0.2"
"@react-spring/rafz": "~10.0.3-beta.0",
"@react-spring/types": "~10.0.3-beta.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-spring/types",
"version": "10.0.2",
"version": "10.0.3-beta.0",
"description": "Internal package with TypeScript stuff",
"module": "./dist/react-spring_types.legacy-esm.js",
"main": "./dist/cjs/index.js",
Expand Down
10 changes: 5 additions & 5 deletions targets/konva/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-spring/konva",
"version": "10.0.2",
"version": "10.0.3-beta.0",
"module": "./dist/react-spring_konva.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_konva.modern.d.mts",
Expand Down Expand Up @@ -44,10 +44,10 @@
"Josh Ellis (https://github.com/joshuaellis)"
],
"dependencies": {
"@react-spring/animated": "~10.0.2",
"@react-spring/core": "~10.0.2",
"@react-spring/shared": "~10.0.2",
"@react-spring/types": "~10.0.2"
"@react-spring/animated": "~10.0.3-beta.0",
"@react-spring/core": "~10.0.3-beta.0",
"@react-spring/shared": "~10.0.3-beta.0",
"@react-spring/types": "~10.0.3-beta.0"
},
"peerDependencies": {
"konva": ">=2.6",
Expand Down
10 changes: 5 additions & 5 deletions targets/native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-spring/native",
"version": "10.0.2",
"version": "10.0.3-beta.0",
"module": "./dist/react-spring_native.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_native.modern.d.mts",
Expand Down Expand Up @@ -38,10 +38,10 @@
"Josh Ellis (https://github.com/joshuaellis)"
],
"dependencies": {
"@react-spring/animated": "~10.0.2",
"@react-spring/core": "~10.0.2",
"@react-spring/shared": "~10.0.2",
"@react-spring/types": "~10.0.2"
"@react-spring/animated": "~10.0.3-beta.0",
"@react-spring/core": "~10.0.3-beta.0",
"@react-spring/shared": "~10.0.3-beta.0",
"@react-spring/types": "~10.0.3-beta.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
Expand Down
10 changes: 5 additions & 5 deletions targets/three/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-spring/three",
"version": "10.0.2",
"version": "10.0.3-beta.0",
"module": "./dist/react-spring_three.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_three.modern.d.mts",
Expand Down Expand Up @@ -44,10 +44,10 @@
"Josh Ellis (https://github.com/joshuaellis)"
],
"dependencies": {
"@react-spring/animated": "~10.0.2",
"@react-spring/core": "~10.0.2",
"@react-spring/shared": "~10.0.2",
"@react-spring/types": "~10.0.2"
"@react-spring/animated": "~10.0.3-beta.0",
"@react-spring/core": "~10.0.3-beta.0",
"@react-spring/shared": "~10.0.3-beta.0",
"@react-spring/types": "~10.0.3-beta.0"
},
"peerDependencies": {
"@react-three/fiber": ">=6.0",
Expand Down
10 changes: 5 additions & 5 deletions targets/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-spring/web",
"version": "10.0.2",
"version": "10.0.3-beta.0",
"module": "./dist/react-spring_web.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_web.modern.d.mts",
Expand Down Expand Up @@ -44,10 +44,10 @@
"Josh Ellis (https://github.com/joshuaellis)"
],
"dependencies": {
"@react-spring/animated": "~10.0.2",
"@react-spring/core": "~10.0.2",
"@react-spring/shared": "~10.0.2",
"@react-spring/types": "~10.0.2"
"@react-spring/animated": "~10.0.3-beta.0",
"@react-spring/core": "~10.0.3-beta.0",
"@react-spring/shared": "~10.0.3-beta.0",
"@react-spring/types": "~10.0.3-beta.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
Expand Down
10 changes: 5 additions & 5 deletions targets/zdog/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-spring/zdog",
"version": "10.0.2",
"version": "10.0.3-beta.0",
"module": "./dist/react-spring_zdog.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_zdog.modern.d.mts",
Expand Down Expand Up @@ -44,10 +44,10 @@
"Josh Ellis (https://github.com/joshuaellis)"
],
"dependencies": {
"@react-spring/animated": "~10.0.2",
"@react-spring/core": "~10.0.2",
"@react-spring/shared": "~10.0.2",
"@react-spring/types": "~10.0.2"
"@react-spring/animated": "~10.0.3-beta.0",
"@react-spring/core": "~10.0.3-beta.0",
"@react-spring/shared": "~10.0.3-beta.0",
"@react-spring/types": "~10.0.3-beta.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
Expand Down
Loading
Loading