[React Native] "Setting a timer for a long period of time" warning
See original GitHub issueVersion 0.3.0 produces warning:
WARN Setting a timer for a long period of time, i.e. multiple minutes, is a performance and correctness issue on Android as it keeps the timer module awake, and timers can only be called when the app is in the foreground. See https://github.com/facebook/react-native/issues/12981 for more info.
Happens because of https://github.com/facebookexperimental/Recoil/blob/master/src/hooks/Recoil_Hooks.js#L60.
Any plans to fix it?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:32
- Comments:8
Top Results From Across the Web
Setting a timer for a long period of time, i.e. multiple minutes
Navigate to your node_modules/react-native/Libraries/Core/Timers/JSTimers.js file. · Look for the variable: MAX_TIMER_DURATION_MS · Change its ...
Read more >Warning about "setting a timer for a long period of time" when ...
The short answer is: the way ably-js uses timers understands this and is appropriate for how they work in react-native on Android, and...
Read more >Timers - React Native
Timers are an important part of an application and React Native implements the browser timers. Timers. setTimeout, clearTimeout; setInterval, ...
Read more >React Native Warning: “Setting a timer for a long period of time ...
This is a warning that certain javascript dependencies will raise on react-native due to an issue on their side and must be solved...
Read more >react native setting a timer for a long period - Code Grepper
react native Setting a timer for a long period of time ; 1. in node_modules > react-native > Libraries > Core > Timers...
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 FreeTop 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
Top GitHub Comments
I got this error when using Recoil in React Native (0.64). Is there a fix planned? I believe it’s caused from the
SUSPENSE_TIMEOUT_MS
in the Recoil_Hooks file. Is it safe to ignore the warning?Seems like the performance on android is bit laggy too