Skip to content

Commit baf964f

Browse files
committed
revert: revert latest fix
1 parent 6967942 commit baf964f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-transitioning",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"description": "React components for easily implementing basic CSS animations and transitions",
55
"main": "dist/index.cjs.js",
66
"module": "dist/index.esm.js",

src/Transition.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useState, useEffect, useMemo, useRef } from 'react';
1+
import { useState, useEffect, useMemo } from 'react';
22
import { useIsoEffect } from './useIsoEffect';
33

44
/**
@@ -138,11 +138,11 @@ export function Transition(props: TransitionProps) {
138138
addEndListener,
139139
} = props;
140140

141-
const ignoreInPropChangeRef = useRef(false);
141+
let ignoreInPropChange = false;
142142

143143
// Make phase state
144144
const [phase, setPhase] = useState(() => {
145-
ignoreInPropChangeRef.current = true;
145+
ignoreInPropChange = true;
146146
if (!inProp) {
147147
return TransitionPhase.EXIT_DONE;
148148
}
@@ -179,7 +179,7 @@ export function Transition(props: TransitionProps) {
179179

180180
// Effect for initial phase
181181
useIsoEffect(() => {
182-
if (!ignoreInPropChangeRef.current) {
182+
if (!ignoreInPropChange) {
183183
if (inProp) {
184184
setPhase(enter ? TransitionPhase.ENTER : TransitionPhase.ENTER_DONE);
185185
} else {

0 commit comments

Comments
 (0)