facebookexperimental/Recoil

[React Native] "Setting a timer for a long period of time" warning

Open

#1030 opened on May 16, 2021

View on GitHub
 (8 comments) (32 reactions) (0 assignees)JavaScript (19,428 stars) (1,151 forks)batch import
help wantednative

Description

Version 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?

Contributor guide