Remove ReactRAFBatchingStrategy
We don't use or support this, so let's just delete it. (#3570)
Ben Alpert committed
Apr 20, 2015 at 12:09 UTC
302f0a1f5aedcf49d45c705318db4595e28532a5
1 file changed
-43
src/addons/ReactRAFBatchingStrategy.js
deleted
-43
@@ -1,43 +0,0 @@
1
-/**
2
- * Copyright 2013-2015, Facebook, Inc.
3
- * All rights reserved.
4
- *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
8
- *
9
- * @providesModule ReactRAFBatchingStrategy
10
- * @typechecks static-only
11
- */
12
-
13
-/* global requestAnimationFrame:true */
14
-
15
-'use strict';
16
-
17
-var ExecutionEnvironment = require('ExecutionEnvironment');
18
-var ReactUpdates = require('ReactUpdates');
19
-
20
-var requestAnimationFrame = require('requestAnimationFrame');
21
-
22
-function tick() {
23
- ReactUpdates.flushBatchedUpdates();
24
- requestAnimationFrame(tick);
25
-}
26
-
27
-var ReactRAFBatchingStrategy = {
28
- isBatchingUpdates: true,
29
-
30
- /**
31
- * Call the provided function in a context within which calls to `setState`
32
- * and friends are batched such that components aren't updated unnecessarily.
33
- */
34
- batchedUpdates: function(callback, a, b, c, d) {
35
- callback(a, b, c, d);
36
- }
37
-};
38
-
39
-if (ExecutionEnvironment.canUseDOM) {
40
- requestAnimationFrame(tick);
41
-}
42
-
43
-module.exports = ReactRAFBatchingStrategy;