12
'use strict';
13
14
var React = require('React');
15
-var ReactAddonsDOMDependencies = require('ReactAddonsDOMDependencies');
15
var ReactTransitionChildMapping = require('ReactTransitionChildMapping');
16
17
var emptyFunction = require('emptyFunction');
55
}
56
57
componentWillReceiveProps(nextProps) {
59
- var nextChildMapping;
60
- if (__DEV__) {
61
- nextChildMapping = ReactTransitionChildMapping.getChildMapping(
62
- nextProps.children,
63
- ReactAddonsDOMDependencies.getReactInstanceMap().get(this)._debugID
64
- );
65
- } else {
66
- nextChildMapping = ReactTransitionChildMapping.getChildMapping(
67
- nextProps.children
68
- );
69
- }
58
+ var nextChildMapping = ReactTransitionChildMapping.getChildMapping(
59
+ nextProps.children
60
+ );
61
var prevChildMapping = this.state.children;
62
63
this.setState({
120
121
delete this.currentlyTransitioningKeys[key];
122
132
- var currentChildMapping;
133
- if (__DEV__) {
134
- currentChildMapping = ReactTransitionChildMapping.getChildMapping(
135
- this.props.children,
136
- ReactAddonsDOMDependencies.getReactInstanceMap().get(this)._debugID
137
- );
138
- } else {
139
- currentChildMapping = ReactTransitionChildMapping.getChildMapping(
140
- this.props.children
141
- );
142
- }
123
+ var currentChildMapping = ReactTransitionChildMapping.getChildMapping(
124
+ this.props.children
125
+ );
126
127
if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) {
128
// This was removed before it had fully appeared. Remove it.
152
153
delete this.currentlyTransitioningKeys[key];
154
172
- var currentChildMapping;
173
- if (__DEV__) {
174
- currentChildMapping = ReactTransitionChildMapping.getChildMapping(
175
- this.props.children,
176
- ReactAddonsDOMDependencies.getReactInstanceMap().get(this)._debugID
177
- );
178
- } else {
179
- currentChildMapping = ReactTransitionChildMapping.getChildMapping(
180
- this.props.children
181
- );
182
- }
155
+ var currentChildMapping = ReactTransitionChildMapping.getChildMapping(
156
+ this.props.children
157
+ );
158
159
if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) {
160
// This was removed before it had fully entered. Remove it.
185
186
delete this.currentlyTransitioningKeys[key];
187
213
- var currentChildMapping;
214
- if (__DEV__) {
215
- currentChildMapping = ReactTransitionChildMapping.getChildMapping(
216
- this.props.children,
217
- ReactAddonsDOMDependencies.getReactInstanceMap().get(this)._debugID
218
- );
219
- } else {
220
- currentChildMapping = ReactTransitionChildMapping.getChildMapping(
221
- this.props.children
222
- );
223
- }
188
+ var currentChildMapping = ReactTransitionChildMapping.getChildMapping(
189
+ this.props.children
190
+ );
191
192
if (currentChildMapping && currentChildMapping.hasOwnProperty(key)) {
193
// This entered again before it fully left. Add it again.