mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Flip useTransition tuple
Summary: This diff flips the order of the tuple returned by useTransition. See here for more info: https://github.com/facebook/react/pull/20976 Changelog: internal Reviewed By: gaearon Differential Revision: D27928490 fbshipit-source-id: a1896f92ef24382012fa3be1ef043752e62b21e7
This commit is contained in:
1 parent
2c34946662
commit
96930fad13
7 files changed
+41
-33
No files matched your search
@@ -1 +1 @@
|
||||
bd7f4a013be3ef272a01874532bee71ad861e617
|
||||
a632f7de3bd35eaf6d5082054af4da92dd37cf20
|
||||
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<2ebb47c89a60a8b3e667fdf7431261b6>>
|
||||
* @generated SignedSource<<85633cd599819668a18b16a0756284c2>>
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
@@ -11173,7 +11173,7 @@ function mountTransition() {
|
||||
var start = startTransition.bind(null, setPending);
|
||||
var hook = mountWorkInProgressHook();
|
||||
hook.memoizedState = start;
|
||||
return [start, isPending];
|
||||
return [isPending, start];
|
||||
}
|
||||
|
||||
function updateTransition() {
|
||||
@@ -11182,7 +11182,7 @@ function updateTransition() {
|
||||
|
||||
var hook = updateWorkInProgressHook();
|
||||
var start = hook.memoizedState;
|
||||
return [start, isPending];
|
||||
return [isPending, start];
|
||||
}
|
||||
|
||||
function rerenderTransition() {
|
||||
@@ -11191,7 +11191,7 @@ function rerenderTransition() {
|
||||
|
||||
var hook = updateWorkInProgressHook();
|
||||
var start = hook.memoizedState;
|
||||
return [start, isPending];
|
||||
return [isPending, start];
|
||||
}
|
||||
|
||||
var isUpdatingOpaqueValueInRenderPhase = false;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<f41656c617fa40163bc178f355249017>>
|
||||
* @generated SignedSource<<9877a9ca3ef854c84fe796f0864c7089>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -3897,7 +3897,7 @@ var ContextOnlyDispatcher = {
|
||||
isPending = _mountState2[0];
|
||||
_mountState2 = startTransition.bind(null, _mountState2[1]);
|
||||
mountWorkInProgressHook().memoizedState = _mountState2;
|
||||
return [_mountState2, isPending];
|
||||
return [isPending, _mountState2];
|
||||
},
|
||||
useMutableSource: function(source, getSnapshot, subscribe) {
|
||||
var hook = mountWorkInProgressHook();
|
||||
@@ -3946,8 +3946,9 @@ var ContextOnlyDispatcher = {
|
||||
return prevValue;
|
||||
},
|
||||
useTransition: function() {
|
||||
var isPending = updateReducer(basicStateReducer)[0];
|
||||
return [updateWorkInProgressHook().memoizedState, isPending];
|
||||
var isPending = updateReducer(basicStateReducer)[0],
|
||||
start = updateWorkInProgressHook().memoizedState;
|
||||
return [isPending, start];
|
||||
},
|
||||
useMutableSource: updateMutableSource,
|
||||
useOpaqueIdentifier: function() {
|
||||
@@ -3988,8 +3989,9 @@ var ContextOnlyDispatcher = {
|
||||
return prevValue;
|
||||
},
|
||||
useTransition: function() {
|
||||
var isPending = rerenderReducer(basicStateReducer)[0];
|
||||
return [updateWorkInProgressHook().memoizedState, isPending];
|
||||
var isPending = rerenderReducer(basicStateReducer)[0],
|
||||
start = updateWorkInProgressHook().memoizedState;
|
||||
return [isPending, start];
|
||||
},
|
||||
useMutableSource: updateMutableSource,
|
||||
useOpaqueIdentifier: function() {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<f4d536820af3da737ebc471060e63f42>>
|
||||
* @generated SignedSource<<7da8cf3208220ac6e1e05d089bd22e17>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -3923,7 +3923,7 @@ var ContextOnlyDispatcher = {
|
||||
isPending = _mountState2[0];
|
||||
_mountState2 = startTransition.bind(null, _mountState2[1]);
|
||||
mountWorkInProgressHook().memoizedState = _mountState2;
|
||||
return [_mountState2, isPending];
|
||||
return [isPending, _mountState2];
|
||||
},
|
||||
useMutableSource: function(source, getSnapshot, subscribe) {
|
||||
var hook = mountWorkInProgressHook();
|
||||
@@ -3972,8 +3972,9 @@ var ContextOnlyDispatcher = {
|
||||
return prevValue;
|
||||
},
|
||||
useTransition: function() {
|
||||
var isPending = updateReducer(basicStateReducer)[0];
|
||||
return [updateWorkInProgressHook().memoizedState, isPending];
|
||||
var isPending = updateReducer(basicStateReducer)[0],
|
||||
start = updateWorkInProgressHook().memoizedState;
|
||||
return [isPending, start];
|
||||
},
|
||||
useMutableSource: updateMutableSource,
|
||||
useOpaqueIdentifier: function() {
|
||||
@@ -4014,8 +4015,9 @@ var ContextOnlyDispatcher = {
|
||||
return prevValue;
|
||||
},
|
||||
useTransition: function() {
|
||||
var isPending = rerenderReducer(basicStateReducer)[0];
|
||||
return [updateWorkInProgressHook().memoizedState, isPending];
|
||||
var isPending = rerenderReducer(basicStateReducer)[0],
|
||||
start = updateWorkInProgressHook().memoizedState;
|
||||
return [isPending, start];
|
||||
},
|
||||
useMutableSource: updateMutableSource,
|
||||
useOpaqueIdentifier: function() {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<5f437c4c1fcda37e2bb8dab0d04f1431>>
|
||||
* @generated SignedSource<<5646d53ee7f4f50af19833b5e7a7253c>>
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
@@ -11492,7 +11492,7 @@ function mountTransition() {
|
||||
var start = startTransition.bind(null, setPending);
|
||||
var hook = mountWorkInProgressHook();
|
||||
hook.memoizedState = start;
|
||||
return [start, isPending];
|
||||
return [isPending, start];
|
||||
}
|
||||
|
||||
function updateTransition() {
|
||||
@@ -11501,7 +11501,7 @@ function updateTransition() {
|
||||
|
||||
var hook = updateWorkInProgressHook();
|
||||
var start = hook.memoizedState;
|
||||
return [start, isPending];
|
||||
return [isPending, start];
|
||||
}
|
||||
|
||||
function rerenderTransition() {
|
||||
@@ -11510,7 +11510,7 @@ function rerenderTransition() {
|
||||
|
||||
var hook = updateWorkInProgressHook();
|
||||
var start = hook.memoizedState;
|
||||
return [start, isPending];
|
||||
return [isPending, start];
|
||||
}
|
||||
|
||||
var isUpdatingOpaqueValueInRenderPhase = false;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<ea82815c6b2135bf145c1c5895967692>>
|
||||
* @generated SignedSource<<7fe4adbce18b530534dc96bc573966a5>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -3933,7 +3933,7 @@ var ContextOnlyDispatcher = {
|
||||
isPending = _mountState2[0];
|
||||
_mountState2 = startTransition.bind(null, _mountState2[1]);
|
||||
mountWorkInProgressHook().memoizedState = _mountState2;
|
||||
return [_mountState2, isPending];
|
||||
return [isPending, _mountState2];
|
||||
},
|
||||
useMutableSource: function(source, getSnapshot, subscribe) {
|
||||
var hook = mountWorkInProgressHook();
|
||||
@@ -3982,8 +3982,9 @@ var ContextOnlyDispatcher = {
|
||||
return prevValue;
|
||||
},
|
||||
useTransition: function() {
|
||||
var isPending = updateReducer(basicStateReducer)[0];
|
||||
return [updateWorkInProgressHook().memoizedState, isPending];
|
||||
var isPending = updateReducer(basicStateReducer)[0],
|
||||
start = updateWorkInProgressHook().memoizedState;
|
||||
return [isPending, start];
|
||||
},
|
||||
useMutableSource: updateMutableSource,
|
||||
useOpaqueIdentifier: function() {
|
||||
@@ -4024,8 +4025,9 @@ var ContextOnlyDispatcher = {
|
||||
return prevValue;
|
||||
},
|
||||
useTransition: function() {
|
||||
var isPending = rerenderReducer(basicStateReducer)[0];
|
||||
return [updateWorkInProgressHook().memoizedState, isPending];
|
||||
var isPending = rerenderReducer(basicStateReducer)[0],
|
||||
start = updateWorkInProgressHook().memoizedState;
|
||||
return [isPending, start];
|
||||
},
|
||||
useMutableSource: updateMutableSource,
|
||||
useOpaqueIdentifier: function() {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<f3ba739eb1c9f66a84cff47bff41d5c4>>
|
||||
* @generated SignedSource<<feadd8235d80907d50c4c6a1249e0c85>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -3959,7 +3959,7 @@ var ContextOnlyDispatcher = {
|
||||
isPending = _mountState2[0];
|
||||
_mountState2 = startTransition.bind(null, _mountState2[1]);
|
||||
mountWorkInProgressHook().memoizedState = _mountState2;
|
||||
return [_mountState2, isPending];
|
||||
return [isPending, _mountState2];
|
||||
},
|
||||
useMutableSource: function(source, getSnapshot, subscribe) {
|
||||
var hook = mountWorkInProgressHook();
|
||||
@@ -4008,8 +4008,9 @@ var ContextOnlyDispatcher = {
|
||||
return prevValue;
|
||||
},
|
||||
useTransition: function() {
|
||||
var isPending = updateReducer(basicStateReducer)[0];
|
||||
return [updateWorkInProgressHook().memoizedState, isPending];
|
||||
var isPending = updateReducer(basicStateReducer)[0],
|
||||
start = updateWorkInProgressHook().memoizedState;
|
||||
return [isPending, start];
|
||||
},
|
||||
useMutableSource: updateMutableSource,
|
||||
useOpaqueIdentifier: function() {
|
||||
@@ -4050,8 +4051,9 @@ var ContextOnlyDispatcher = {
|
||||
return prevValue;
|
||||
},
|
||||
useTransition: function() {
|
||||
var isPending = rerenderReducer(basicStateReducer)[0];
|
||||
return [updateWorkInProgressHook().memoizedState, isPending];
|
||||
var isPending = rerenderReducer(basicStateReducer)[0],
|
||||
start = updateWorkInProgressHook().memoizedState;
|
||||
return [isPending, start];
|
||||
},
|
||||
useMutableSource: updateMutableSource,
|
||||
useOpaqueIdentifier: function() {
|
||||
|
||||
Reference in new issue
Block a user