File tree 3 files changed +17
-7
lines changed
packages/react-native-reanimated
3 files changed +17
-7
lines changed Original file line number Diff line number Diff line change 175
175
}
176
176
},
177
177
"sideEffects" : [
178
+ " ./src/layoutReanimation/animationsManager.ts" ,
178
179
" ./lib/module/layoutReanimation/animationsManager.js" ,
180
+ " ./src/core.ts" ,
179
181
" ./lib/module/core.js" ,
182
+ " ./src/initializers.ts" ,
180
183
" ./lib/module/initializers.js" ,
184
+ " ./src/index.ts" ,
181
185
" ./lib/module/index.js"
182
186
]
183
187
}
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
import { ReanimatedModule } from './ReanimatedModule' ;
3
- import { isWeb , shouldBeUseWeb , isFabric } from './PlatformChecker' ;
3
+ import { shouldBeUseWeb , isFabric } from './PlatformChecker' ;
4
4
import type {
5
5
AnimatedKeyboardOptions ,
6
6
LayoutAnimationBatchItem ,
@@ -11,10 +11,10 @@ import type {
11
11
ValueRotation ,
12
12
WorkletFunction ,
13
13
} from './commonTypes' ;
14
- import { makeShareableCloneRecursive } from './shareables ' ;
14
+ import { ReanimatedError } from './errors ' ;
15
15
import { initializeUIRuntime } from './initializers' ;
16
16
import { SensorContainer } from './SensorContainer' ;
17
- import { ReanimatedError } from './errors ' ;
17
+ import { makeShareableCloneRecursive } from './shareables ' ;
18
18
19
19
export { startMapper , stopMapper } from './mappers' ;
20
20
export { runOnJS , runOnUI , executeOnUIRuntimeSync } from './threads' ;
@@ -154,9 +154,7 @@ export function unregisterSensor(sensorId: number): void {
154
154
return sensorContainer . unregisterSensor ( sensorId ) ;
155
155
}
156
156
157
- if ( ! isWeb ( ) ) {
158
- initializeUIRuntime ( ReanimatedModule ) ;
159
- }
157
+ initializeUIRuntime ( ReanimatedModule ) ;
160
158
161
159
type FeaturesConfig = {
162
160
enableLayoutAnimations : boolean ;
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
import { registerReanimatedError , reportFatalErrorOnJS } from './errors' ;
3
- import { isChromeDebugger , isJest , shouldBeUseWeb } from './PlatformChecker' ;
3
+ import {
4
+ isChromeDebugger ,
5
+ isJest ,
6
+ isWeb ,
7
+ shouldBeUseWeb ,
8
+ } from './PlatformChecker' ;
4
9
import {
5
10
runOnJS ,
6
11
setupMicrotasks ,
@@ -180,6 +185,9 @@ function setupRequestAnimationFrame() {
180
185
}
181
186
182
187
export function initializeUIRuntime ( ReanimatedModule : IReanimatedModule ) {
188
+ if ( isWeb ( ) ) {
189
+ return ;
190
+ }
183
191
if ( ! ReanimatedModule ) {
184
192
// eslint-disable-next-line reanimated/use-reanimated-error
185
193
throw new Error (
You can’t perform that action at this time.
0 commit comments