Skip to content

Commit 10aa771

Browse files
committed
Revert "fix: assign controller to provided ref for useTransition (pmndrs#1475)"
This reverts commit 8b36268.
1 parent 922f640 commit 10aa771

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

packages/core/src/hooks/useTransition.test.tsx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { RenderResult, render } from '@testing-library/react'
44
import { toArray } from '@react-spring/shared'
55
import { TransitionFn, UseTransitionProps } from '../types'
66
import { useTransition } from './useTransition'
7-
import { SpringRef } from '../SpringRef'
87

98
describe('useTransition', () => {
109
let transition: TransitionFn
@@ -36,18 +35,6 @@ describe('useTransition', () => {
3635
expect(rendered).toEqual([false])
3736
})
3837

39-
it('assign controllers to provided "ref"', async () => {
40-
const ref = new SpringRef()
41-
const props = {
42-
ref,
43-
}
44-
const children = [<div />, <div />, <div />]
45-
46-
update(children, props)
47-
48-
expect(ref.current).toHaveLength(3)
49-
})
50-
5138
describe('when "leave" is an array', () => {
5239
it('unmounts after leave', async () => {
5340
const props = {

packages/core/src/hooks/useTransition.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ export function useTransition(
199199
// The payload is used to update the spring props once the current render is committed.
200200
const payload: ControllerUpdate<UnknownProps> = {
201201
...defaultProps,
202-
ref: props.ref,
203202
delay: (delay += trail),
204203
// This prevents implied resets.
205204
reset: false,

0 commit comments

Comments
 (0)