@@ -212,7 +212,8 @@ class Transition extends React.Component {
212212 if ( timeout != null && typeof timeout !== 'number' ) {
213213 exit = timeout . exit
214214 enter = timeout . enter
215- appear = timeout . appear
215+ // TODO: remove fallback for next major
216+ appear = timeout . appear !== undefined ? timeout . appear : enter
216217 }
217218 return { exit, enter, appear }
218219 }
@@ -240,7 +241,7 @@ class Transition extends React.Component {
240241 : mounting
241242
242243 const timeouts = this . getTimeouts ( )
243-
244+ const enterTimeout = appearing ? timeouts . appear : timeouts . enter
244245 // no enter animation skip right to ENTERED
245246 // if we are mounting and running this it means appear _must_ be set
246247 if ( ! mounting && ! enter ) {
@@ -255,8 +256,7 @@ class Transition extends React.Component {
255256 this . safeSetState ( { status : ENTERING } , ( ) => {
256257 this . props . onEntering ( node , appearing )
257258
258- // FIXME: appear timeout?
259- this . onTransitionEnd ( node , timeouts . enter , ( ) => {
259+ this . onTransitionEnd ( node , enterTimeout , ( ) => {
260260 this . safeSetState ( { status : ENTERED } , ( ) => {
261261 this . props . onEntered ( node , appearing )
262262 } )
@@ -438,9 +438,12 @@ Transition.propTypes = {
438438 * timeout={{
439439 * enter: 300,
440440 * exit: 500,
441+ * appear: 500,
441442 * }}
442443 * ```
443444 *
445+ * If the value of appear is not set, then the value from enter is taken.
446+ *
444447 * @type {number | { enter?: number, exit?: number } }
445448 */
446449 timeout : ( props , ...args ) => {
0 commit comments