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

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
add version check
  • Loading branch information
robertjarske committed May 24, 2025
commit 71d07a22efda2e8f146c1a2c6d76fdd360bbdde8
2 changes: 2 additions & 0 deletions packages/core/src/hooks/useTransition.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as React from 'react'
import { version as reactVersion } from 'react/package.json'
import { useContext, useRef, useMemo } from 'react'
import { Lookup, OneOrMore, UnknownProps } from '@react-spring/types'
import {
Expand Down Expand Up @@ -436,6 +437,7 @@ export function useTransition(
<elem.type
{...elem.props}
key={is.str(t.key) || is.num(t.key) ? t.key : t.ctrl.id}
ref={reactVersion < '19.0.0' ? elem.ref : elem.props.ref}
/>
) : (
elem
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"skipLibCheck": true,
"strictNullChecks": true
"strictNullChecks": true,
"resolveJsonModule": true
}
}