@@ -224,39 +224,10 @@ function createAnimatedComponent<Props: {+[string]: mixed, ...}, Instance>(
224
224
this . props . passthroughAnimatedPropExplicitValues || { } ;
225
225
const mergedStyle = { ...style , ...passthruStyle } ;
226
226
227
- // On Fabric, we always want to ensure the container Animated View is *not*
228
- // flattened.
229
- // Because we do not get a host component ref immediately and thus cannot
230
- // do a proper Fabric vs non-Fabric detection immediately, we default to assuming
231
- // that Fabric *is* enabled until we know otherwise.
232
- // Thus, in Fabric, this view will never be flattened. In non-Fabric, the view will
233
- // not be flattened during the initial render but may be flattened in the second render
234
- // and onwards.
235
- const forceNativeIdFabric =
236
- ( this . _component == null &&
237
- ( options ?. collapsable === false || props . collapsable !== true ) ) ||
238
- this . _isFabric ( ) ;
239
-
240
- const forceNativeId =
241
- props . collapsable ??
242
- ( this . _propsAnimated . __isNative ||
243
- forceNativeIdFabric ||
244
- options ?. collapsable === false ) ;
245
- // The native driver updates views directly through the UI thread so we
246
- // have to make sure the view doesn't get optimized away because it cannot
247
- // go through the NativeViewHierarchyManager since it operates on the shadow
248
- // thread. TODO: T68258846
249
- const collapsableProps = forceNativeId
250
- ? {
251
- nativeID : props . nativeID ?? 'animatedComponent' ,
252
- collapsable : false ,
253
- }
254
- : { } ;
255
227
return (
256
228
< Component
257
229
{ ...props }
258
230
{ ...passthruProps }
259
- { ...collapsableProps }
260
231
style = { mergedStyle }
261
232
ref = { this . _setComponentRef }
262
233
/>
0 commit comments