Skip to content

Commit

Permalink
Revert "fix: assign controller to provided ref for useTransition (#1475
Browse files Browse the repository at this point in the history
…)"

This reverts commit 8b36268.
  • Loading branch information
joshuaellis committed Apr 29, 2021
1 parent 922f640 commit 10aa771
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
13 changes: 0 additions & 13 deletions packages/core/src/hooks/useTransition.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { RenderResult, render } from '@testing-library/react'
import { toArray } from '@react-spring/shared'
import { TransitionFn, UseTransitionProps } from '../types'
import { useTransition } from './useTransition'
import { SpringRef } from '../SpringRef'

describe('useTransition', () => {
let transition: TransitionFn
Expand Down Expand Up @@ -36,18 +35,6 @@ describe('useTransition', () => {
expect(rendered).toEqual([false])
})

it('assign controllers to provided "ref"', async () => {
const ref = new SpringRef()
const props = {
ref,
}
const children = [<div />, <div />, <div />]

update(children, props)

expect(ref.current).toHaveLength(3)
})

describe('when "leave" is an array', () => {
it('unmounts after leave', async () => {
const props = {
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/hooks/useTransition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ export function useTransition(
// The payload is used to update the spring props once the current render is committed.
const payload: ControllerUpdate<UnknownProps> = {
...defaultProps,
ref: props.ref,
delay: (delay += trail),
// This prevents implied resets.
reset: false,
Expand Down

0 comments on commit 10aa771

Please sign in to comment.