TypeError: global.performance.now is not a function
See original GitHub issueDescription
App crash when we start animation TypeError: global.performance.now is not a function
Expected behavior
Scroll Without Crashed
Actual behavior & steps to reproduce
- Scroll on Flatlist
Snack or minimal code example
<FlatList style={{ flex: 1 }}
contentInset={{ top: 24 }}
data={posts}
renderScrollComponent={props => <Animated.ScrollView {...props} />}
renderItem={({ item, index }) => <FeedCell post={item} imageIndex={item.id} onRemove={() => onRemove(item.id)} />}
keyExtractor={(item, ind) => `${item.id}`}
// Performance settings
removeClippedSubviews={true} // Unmount components when outside of window
initialNumToRender={6} // Reduce initial render amount
maxToRenderPerBatch={2} // Reduce number in each render batch
updateCellsBatchingPeriod={100} // Increase time between renders
windowSize={6}
scrollIndicatorInsets={{ top: 0 }}
/>
Package versions
- React Native: 0.64.4
- React Native Reanimated: 2.3.0
- NodeJS: 17
- Xcode: 13
- Java & Gradle:
Affected platforms
- Android
- [ x] iOS
- Web
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:5 (2 by maintainers)
Top Results From Across the Web
global.performance.now is not a function in react native ...
Unable to find any solution to this query. TypeError: global.performance.now is not a function at node_modules/expo/build/ ...
Read more >global.performance.now is not a function in react native #3153
TypeError : global.performance.now is not a function in react native #3153 ; Missing repro This issue need minimum repro scenario ; Needs review ......
Read more >TypeError: global.performance.now is not a function
TypeError : global.performance.now is not a function ; 1. make change to this file: node_modules/react-native-reanimated/src/reanimated2/core.ts Line 386, remove ...
Read more >[Solved] TypeError: global.performance.now is not a function
How to Fix “TypeError: global.performance.now is not a function”? Ranjith Changed status to publish June 17, 2022 ...
Read more >How to solve the issue that arise while using performance.now ...
Generally, the best way to check the performance of the functions in JavaScript is the built-in performance.now() method.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

same issue, when use
useAnimatedStyleI think we can close this too, it is fixed in https://github.com/software-mansion/react-native-reanimated/pull/2761 by @michaelknoch and @piaskowyk.