mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-10 01:15:00 +08:00
Remove exported constants from RCTTimers to allow lazy initialization
Summary: As per javache comments in #8734. Also removes now useless feature detection check. **Test plan** Tested that rIC still works in UIExplorer example. Closes https://github.com/facebook/react-native/pull/8795 Differential Revision: D3572566 Pulled By: javache fbshipit-source-id: 261d13d8b03898313f8b4184d634c70f81a61b62
This commit is contained in:
committed by
Facebook Github Bot 4
parent
f067811cd2
commit
80872ffccd
@@ -101,11 +101,6 @@ var JSTimers = {
|
||||
* with time remaining in frame.
|
||||
*/
|
||||
requestIdleCallback: function(func) {
|
||||
if (!RCTTiming.setSendIdleEvents) {
|
||||
console.warn('requestIdleCallback is not currently supported on this platform');
|
||||
return requestAnimationFrame(func);
|
||||
}
|
||||
|
||||
if (JSTimersExecution.requestIdleCallbacks.length === 0) {
|
||||
RCTTiming.setSendIdleEvents(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user