Skip to content

Commit aa2db98

Browse files
committed
feat: add warning to useTransition for "keys" prop
The user wants "key" instead
1 parent d5a7562 commit aa2db98

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/core/src/useTransition.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ export function useTransition(
113113
): TransitionFn {
114114
const { key, ref, reset, sort, trail = 0, expires = Infinity } = props
115115

116+
if ('keys' in props) {
117+
console.warn(
118+
'Unknown prop "keys" was passed to useTransition. Did you mean "key"?'
119+
)
120+
}
121+
116122
// Every item has its own transition.
117123
const items = toArray(data)
118124
const transitions: TransitionState[] = []

0 commit comments

Comments
 (0)