@@ -222,19 +222,18 @@ class Transition extends React.Component {
222
222
if ( nextStatus !== null ) {
223
223
// nextStatus will always be ENTERING or EXITING.
224
224
this . cancelNextCallback ( )
225
- const node = ReactDOM . findDOMNode ( this )
226
225
227
226
if ( nextStatus === ENTERING ) {
228
- this . performEnter ( node , mounting )
227
+ this . performEnter ( mounting )
229
228
} else {
230
- this . performExit ( node )
229
+ this . performExit ( )
231
230
}
232
231
} else if ( this . props . unmountOnExit && this . state . status === EXITED ) {
233
232
this . setState ( { status : UNMOUNTED } )
234
233
}
235
234
}
236
235
237
- performEnter ( node , mounting ) {
236
+ performEnter ( mounting ) {
238
237
const { enter } = this . props
239
238
const appearing = this . context . transitionGroup
240
239
? this . context . transitionGroup . isMounting
@@ -246,43 +245,43 @@ class Transition extends React.Component {
246
245
// if we are mounting and running this it means appear _must_ be set
247
246
if ( ! mounting && ! enter ) {
248
247
this . safeSetState ( { status : ENTERED } , ( ) => {
249
- this . props . onEntered ( node )
248
+ this . props . onEntered ( ReactDOM . findDOMNode ( this ) )
250
249
} )
251
250
return
252
251
}
253
252
254
- this . props . onEnter ( node , appearing )
253
+ this . props . onEnter ( ReactDOM . findDOMNode ( this ) , appearing )
255
254
256
255
this . safeSetState ( { status : ENTERING } , ( ) => {
257
- this . props . onEntering ( node , appearing )
256
+ this . props . onEntering ( ReactDOM . findDOMNode ( this ) , appearing )
258
257
259
- this . onTransitionEnd ( node , enterTimeout , ( ) => {
258
+ this . onTransitionEnd ( enterTimeout , ( ) => {
260
259
this . safeSetState ( { status : ENTERED } , ( ) => {
261
- this . props . onEntered ( node , appearing )
260
+ this . props . onEntered ( ReactDOM . findDOMNode ( this ) , appearing )
262
261
} )
263
262
} )
264
263
} )
265
264
}
266
265
267
- performExit ( node ) {
266
+ performExit ( ) {
268
267
const { exit } = this . props
269
268
const timeouts = this . getTimeouts ( )
270
269
271
270
// no exit animation skip right to EXITED
272
271
if ( ! exit ) {
273
272
this . safeSetState ( { status : EXITED } , ( ) => {
274
- this . props . onExited ( node )
273
+ this . props . onExited ( ReactDOM . findDOMNode ( this ) )
275
274
} )
276
275
return
277
276
}
278
- this . props . onExit ( node )
277
+ this . props . onExit ( ReactDOM . findDOMNode ( this ) )
279
278
280
279
this . safeSetState ( { status : EXITING } , ( ) => {
281
- this . props . onExiting ( node )
280
+ this . props . onExiting ( ReactDOM . findDOMNode ( this ) )
282
281
283
- this . onTransitionEnd ( node , timeouts . exit , ( ) => {
282
+ this . onTransitionEnd ( timeouts . exit , ( ) => {
284
283
this . safeSetState ( { status : EXITED } , ( ) => {
285
- this . props . onExited ( node )
284
+ this . props . onExited ( ReactDOM . findDOMNode ( this ) )
286
285
} )
287
286
} )
288
287
} )
@@ -322,7 +321,8 @@ class Transition extends React.Component {
322
321
return this . nextCallback
323
322
}
324
323
325
- onTransitionEnd ( node , timeout , handler ) {
324
+ onTransitionEnd ( timeout , handler ) {
325
+ const node = ReactDOM . findDOMNode ( this ) ;
326
326
this . setNextCallback ( handler )
327
327
328
328
const doesNotHaveTimeoutOrListener = timeout == null && ! this . props . addEndListener
0 commit comments