You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/interactionmanager.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,14 @@
1
1
---
2
2
id: interactionmanager
3
-
title: InteractionManager
3
+
title: 🗑️ InteractionManager
4
4
---
5
5
6
6
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
7
7
8
+
:::warning Deprecated
9
+
Use the [`setImmediate`](timers) instead.
10
+
:::
11
+
8
12
InteractionManager allows long-running work to be scheduled after any interactions/animations have completed. In particular, this allows JavaScript animations to run smoothly.
9
13
10
14
Applications can schedule tasks to run after interactions with the following:
Copy file name to clipboardExpand all lines: docs/timers.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,10 @@ Timers are an important part of an application and React Native implements the [
7
7
8
8
## Timers
9
9
10
-
- setTimeout, clearTimeout
11
-
- setInterval, clearInterval
12
-
- setImmediate, clearImmediate
13
-
- requestAnimationFrame, cancelAnimationFrame
10
+
-`setTimeout` and `clearTimeout`
11
+
-`setInterval` and `clearInterval`
12
+
-`setImmediate` and `clearImmediate`
13
+
-`requestAnimationFrame` and `cancelAnimationFrame`
14
14
15
15
`requestAnimationFrame(fn)` is not the same as `setTimeout(fn, 0)` - the former will fire after all the frames have flushed, whereas the latter will fire as quickly as possible (over 1000x per second on a iPhone 5S).
16
16
@@ -25,6 +25,10 @@ Please correct this by running ``adb shell "date `date +%m%d%H%M%Y.%S%3N`"`` on
25
25
26
26
## InteractionManager
27
27
28
+
:::warning Deprecated
29
+
The `InteractionManager` behavior has been changed to be the same as `setImmediate`, which should be used instead.
30
+
:::
31
+
28
32
One reason why well-built native apps feel so smooth is by avoiding expensive operations during interactions and animations. In React Native, we currently have a limitation that there is only a single JS execution thread, but you can use `InteractionManager` to make sure long-running work is scheduled to start after any interactions/animations have completed.
29
33
30
34
Applications can schedule tasks to run after interactions with the following:
@@ -43,7 +47,7 @@ Compare this to other scheduling alternatives:
43
47
44
48
The touch handling system considers one or more active touches to be an 'interaction' and will delay `runAfterInteractions()` callbacks until all touches have ended or been cancelled.
45
49
46
-
InteractionManager also allows applications to register animations by creating an interaction 'handle' on animation start, and clearing it upon completion:
50
+
`InteractionManager` also allows applications to register animations by creating an interaction 'handle' on animation start, and clearing it upon completion:
Copy file name to clipboardExpand all lines: website/versioned_docs/version-0.80/interactionmanager.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,14 @@
1
1
---
2
2
id: interactionmanager
3
-
title: InteractionManager
3
+
title: 🗑️ InteractionManager
4
4
---
5
5
6
6
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
7
7
8
+
:::warning Deprecated
9
+
Use the [`setImmediate`](timers) instead.
10
+
:::
11
+
8
12
InteractionManager allows long-running work to be scheduled after any interactions/animations have completed. In particular, this allows JavaScript animations to run smoothly.
9
13
10
14
Applications can schedule tasks to run after interactions with the following:
Copy file name to clipboardExpand all lines: website/versioned_docs/version-0.80/timers.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,10 @@ Timers are an important part of an application and React Native implements the [
7
7
8
8
## Timers
9
9
10
-
- setTimeout, clearTimeout
11
-
- setInterval, clearInterval
12
-
- setImmediate, clearImmediate
13
-
- requestAnimationFrame, cancelAnimationFrame
10
+
-`setTimeout` and `clearTimeout`
11
+
-`setInterval` and `clearInterval`
12
+
-`setImmediate` and `clearImmediate`
13
+
-`requestAnimationFrame` and `cancelAnimationFrame`
14
14
15
15
`requestAnimationFrame(fn)` is not the same as `setTimeout(fn, 0)` - the former will fire after all the frames have flushed, whereas the latter will fire as quickly as possible (over 1000x per second on a iPhone 5S).
16
16
@@ -25,6 +25,10 @@ Please correct this by running ``adb shell "date `date +%m%d%H%M%Y.%S%3N`"`` on
25
25
26
26
## InteractionManager
27
27
28
+
:::warning Deprecated
29
+
The `InteractionManager` behavior has been changed to be the same as `setImmediate`, which should be used instead.
30
+
:::
31
+
28
32
One reason why well-built native apps feel so smooth is by avoiding expensive operations during interactions and animations. In React Native, we currently have a limitation that there is only a single JS execution thread, but you can use `InteractionManager` to make sure long-running work is scheduled to start after any interactions/animations have completed.
29
33
30
34
Applications can schedule tasks to run after interactions with the following:
@@ -43,7 +47,7 @@ Compare this to other scheduling alternatives:
43
47
44
48
The touch handling system considers one or more active touches to be an 'interaction' and will delay `runAfterInteractions()` callbacks until all touches have ended or been cancelled.
45
49
46
-
InteractionManager also allows applications to register animations by creating an interaction 'handle' on animation start, and clearing it upon completion:
50
+
`InteractionManager` also allows applications to register animations by creating an interaction 'handle' on animation start, and clearing it upon completion:
Copy file name to clipboardExpand all lines: website/versioned_docs/version-0.81/interactionmanager.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,14 @@
1
1
---
2
2
id: interactionmanager
3
-
title: InteractionManager
3
+
title: 🗑️ InteractionManager
4
4
---
5
5
6
6
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import constants from '@site/core/TabsConstants';
7
7
8
+
:::warning Deprecated
9
+
Use the [`setImmediate`](timers) instead.
10
+
:::
11
+
8
12
InteractionManager allows long-running work to be scheduled after any interactions/animations have completed. In particular, this allows JavaScript animations to run smoothly.
9
13
10
14
Applications can schedule tasks to run after interactions with the following:
Copy file name to clipboardExpand all lines: website/versioned_docs/version-0.81/timers.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,10 @@ Timers are an important part of an application and React Native implements the [
7
7
8
8
## Timers
9
9
10
-
- setTimeout, clearTimeout
11
-
- setInterval, clearInterval
12
-
- setImmediate, clearImmediate
13
-
- requestAnimationFrame, cancelAnimationFrame
10
+
-`setTimeout` and `clearTimeout`
11
+
-`setInterval` and `clearInterval`
12
+
-`setImmediate` and `clearImmediate`
13
+
-`requestAnimationFrame` and `cancelAnimationFrame`
14
14
15
15
`requestAnimationFrame(fn)` is not the same as `setTimeout(fn, 0)` - the former will fire after all the frames have flushed, whereas the latter will fire as quickly as possible (over 1000x per second on a iPhone 5S).
16
16
@@ -25,6 +25,10 @@ Please correct this by running ``adb shell "date `date +%m%d%H%M%Y.%S%3N`"`` on
25
25
26
26
## InteractionManager
27
27
28
+
:::warning Deprecated
29
+
The `InteractionManager` behavior has been changed to be the same as `setImmediate`, which should be used instead.
30
+
:::
31
+
28
32
One reason why well-built native apps feel so smooth is by avoiding expensive operations during interactions and animations. In React Native, we currently have a limitation that there is only a single JS execution thread, but you can use `InteractionManager` to make sure long-running work is scheduled to start after any interactions/animations have completed.
29
33
30
34
Applications can schedule tasks to run after interactions with the following:
@@ -43,7 +47,7 @@ Compare this to other scheduling alternatives:
43
47
44
48
The touch handling system considers one or more active touches to be an 'interaction' and will delay `runAfterInteractions()` callbacks until all touches have ended or been cancelled.
45
49
46
-
InteractionManager also allows applications to register animations by creating an interaction 'handle' on animation start, and clearing it upon completion:
50
+
`InteractionManager` also allows applications to register animations by creating an interaction 'handle' on animation start, and clearing it upon completion:
0 commit comments