@@ -55,18 +55,18 @@ export const EXITING = 'exiting';
5555 * component (such as by adding styles or classes) when it changes states.
5656 *
5757 * There are 4 main states a Transition can be in:
58- * - `entering`
59- * - `entered`
60- * - `exiting`
61- * - `exited`
58+ * - `' entering' `
59+ * - `' entered' `
60+ * - `' exiting' `
61+ * - `' exited' `
6262 *
6363 * Transition state is toggled via the `in` prop. When `true` the component begins the
6464 * "Enter" stage. During this stage, the component will shift from its current transition state,
6565 * to `'entering'` for the duration of the transition and then to the `'entered'` stage once
6666 * it's complete. Let's take the following example:
6767 *
6868 * ```jsx
69- * state= { in: false };
69+ * state = { in: false };
7070 *
7171 * toggleEnterState = () => {
7272 * this.setState({ in: true });
@@ -87,6 +87,14 @@ export const EXITING = 'exiting';
8787 *
8888 * When `in` is `false` the same thing happens except the state moves from `'exiting'` to `'exited'`.
8989 *
90+ * ## Timing
91+ *
92+ * Timing is often the trickiest part of animation, mistakes can result in slight delays
93+ * that are hard to pin down. A common example is when you want to add an exit transition,
94+ * you should set the desired final styles when the state is `'exiting'`. That's when the
95+ * transition to those styles will start and, if you matched the `timeout` prop with the
96+ * CSS Transition duration, it will end exactly when the state changes to `'exited'`.
97+ *
9098 * > **Note**: For simpler transitions the `Transition` component might be enough, but
9199 * > take into account that it's platform-agnostic, while the `CSSTransition` component
92100 * > [forces reflows](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)
0 commit comments