question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: global.performance.now is not a function

See original GitHub issue

Description

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:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Cryspcommented, Dec 12, 2021

same issue, when use useAnimatedStyle

1reaction
enesozturkcommented, Dec 18, 2021
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found