@@ -66,7 +66,7 @@ if (__DEV__) {
66
66
return self;
67
67
}
68
68
69
- var ReactVersion = "19.0.0-www-classic-407418be ";
69
+ var ReactVersion = "19.0.0-www-classic-3513bb8c ";
70
70
71
71
var LegacyRoot = 0;
72
72
var ConcurrentRoot = 1;
@@ -10518,10 +10518,10 @@ if (__DEV__) {
10518
10518
hook.baseState = passthrough;
10519
10519
var dispatch = hook.queue.dispatch;
10520
10520
return [passthrough, dispatch];
10521
- } // useFormState actions run sequentially, because each action receives the
10521
+ } // useActionState actions run sequentially, because each action receives the
10522
10522
// previous state as an argument. We store pending actions on a queue.
10523
10523
10524
- function dispatchFormState (
10524
+ function dispatchActionState (
10525
10525
fiber,
10526
10526
actionQueue,
10527
10527
setPendingState,
@@ -10542,7 +10542,7 @@ if (__DEV__) {
10542
10542
next: null // circular
10543
10543
};
10544
10544
newLast.next = actionQueue.pending = newLast;
10545
- runFormStateAction (actionQueue, setPendingState, setState, payload);
10545
+ runActionStateAction (actionQueue, setPendingState, setState, payload);
10546
10546
} else {
10547
10547
// There's already an action running. Add to the queue.
10548
10548
var first = last.next;
@@ -10554,7 +10554,7 @@ if (__DEV__) {
10554
10554
}
10555
10555
}
10556
10556
10557
- function runFormStateAction (
10557
+ function runActionStateAction (
10558
10558
actionQueue,
10559
10559
setPendingState,
10560
10560
setState,
@@ -10591,14 +10591,14 @@ if (__DEV__) {
10591
10591
thenable.then(
10592
10592
function (nextState) {
10593
10593
actionQueue.state = nextState;
10594
- finishRunningFormStateAction (
10594
+ finishRunningActionStateAction (
10595
10595
actionQueue,
10596
10596
setPendingState,
10597
10597
setState
10598
10598
);
10599
10599
},
10600
10600
function () {
10601
- return finishRunningFormStateAction (
10601
+ return finishRunningActionStateAction (
10602
10602
actionQueue,
10603
10603
setPendingState,
10604
10604
setState
@@ -10610,10 +10610,14 @@ if (__DEV__) {
10610
10610
setState(returnValue);
10611
10611
var nextState = returnValue;
10612
10612
actionQueue.state = nextState;
10613
- finishRunningFormStateAction(actionQueue, setPendingState, setState);
10613
+ finishRunningActionStateAction(
10614
+ actionQueue,
10615
+ setPendingState,
10616
+ setState
10617
+ );
10614
10618
}
10615
10619
} catch (error) {
10616
- // This is a trick to get the `useFormState ` hook to rethrow the error.
10620
+ // This is a trick to get the `useActionState ` hook to rethrow the error.
10617
10621
// When it unwraps the thenable with the `use` algorithm, the error
10618
10622
// will be thrown.
10619
10623
var rejectedThenable = {
@@ -10622,7 +10626,7 @@ if (__DEV__) {
10622
10626
reason: error // $FlowFixMe: Not sure why this doesn't work
10623
10627
};
10624
10628
setState(rejectedThenable);
10625
- finishRunningFormStateAction (actionQueue, setPendingState, setState);
10629
+ finishRunningActionStateAction (actionQueue, setPendingState, setState);
10626
10630
} finally {
10627
10631
ReactCurrentBatchConfig$2.transition = prevTransition;
10628
10632
@@ -10644,7 +10648,7 @@ if (__DEV__) {
10644
10648
}
10645
10649
}
10646
10650
10647
- function finishRunningFormStateAction (
10651
+ function finishRunningActionStateAction (
10648
10652
actionQueue,
10649
10653
setPendingState,
10650
10654
setState
@@ -10664,7 +10668,7 @@ if (__DEV__) {
10664
10668
var next = first.next;
10665
10669
last.next = next; // Run the next action.
10666
10670
10667
- runFormStateAction (
10671
+ runActionStateAction (
10668
10672
actionQueue,
10669
10673
setPendingState,
10670
10674
setState,
@@ -10674,11 +10678,11 @@ if (__DEV__) {
10674
10678
}
10675
10679
}
10676
10680
10677
- function formStateReducer (oldState, newState) {
10681
+ function actionStateReducer (oldState, newState) {
10678
10682
return newState;
10679
10683
}
10680
10684
10681
- function mountFormState (action, initialStateProp, permalink) {
10685
+ function mountActionState (action, initialStateProp, permalink) {
10682
10686
var initialState = initialStateProp;
10683
10687
// the `use` algorithm during render.
10684
10688
@@ -10690,7 +10694,7 @@ if (__DEV__) {
10690
10694
pending: null,
10691
10695
lanes: NoLanes,
10692
10696
dispatch: null,
10693
- lastRenderedReducer: formStateReducer ,
10697
+ lastRenderedReducer: actionStateReducer ,
10694
10698
lastRenderedState: initialState
10695
10699
};
10696
10700
stateHook.queue = stateQueue;
@@ -10722,7 +10726,7 @@ if (__DEV__) {
10722
10726
pending: null
10723
10727
};
10724
10728
actionQueueHook.queue = actionQueue;
10725
- var dispatch = dispatchFormState .bind(
10729
+ var dispatch = dispatchActionState .bind(
10726
10730
null,
10727
10731
currentlyRenderingFiber$1,
10728
10732
actionQueue,
@@ -10737,13 +10741,13 @@ if (__DEV__) {
10737
10741
return [initialState, dispatch, false];
10738
10742
}
10739
10743
10740
- function updateFormState (action, initialState, permalink) {
10744
+ function updateActionState (action, initialState, permalink) {
10741
10745
var stateHook = updateWorkInProgressHook();
10742
10746
var currentStateHook = currentHook;
10743
- return updateFormStateImpl (stateHook, currentStateHook, action);
10747
+ return updateActionStateImpl (stateHook, currentStateHook, action);
10744
10748
}
10745
10749
10746
- function updateFormStateImpl (
10750
+ function updateActionStateImpl (
10747
10751
stateHook,
10748
10752
currentStateHook,
10749
10753
action,
@@ -10753,7 +10757,7 @@ if (__DEV__) {
10753
10757
var _updateReducerImpl = updateReducerImpl(
10754
10758
stateHook,
10755
10759
currentStateHook,
10756
- formStateReducer
10760
+ actionStateReducer
10757
10761
),
10758
10762
actionResult = _updateReducerImpl[0];
10759
10763
@@ -10776,7 +10780,7 @@ if (__DEV__) {
10776
10780
currentlyRenderingFiber$1.flags |= Passive$1;
10777
10781
pushEffect(
10778
10782
HasEffect | Passive,
10779
- formStateActionEffect .bind(null, actionQueue, action),
10783
+ actionStateActionEffect .bind(null, actionQueue, action),
10780
10784
createEffectInstance(),
10781
10785
null
10782
10786
);
@@ -10785,12 +10789,12 @@ if (__DEV__) {
10785
10789
return [state, dispatch, isPending];
10786
10790
}
10787
10791
10788
- function formStateActionEffect (actionQueue, action) {
10792
+ function actionStateActionEffect (actionQueue, action) {
10789
10793
actionQueue.action = action;
10790
10794
}
10791
10795
10792
- function rerenderFormState (action, initialState, permalink) {
10793
- // Unlike useState, useFormState doesn't support render phase updates.
10796
+ function rerenderActionState (action, initialState, permalink) {
10797
+ // Unlike useState, useActionState doesn't support render phase updates.
10794
10798
// Also unlike useState, we need to replay all pending updates again in case
10795
10799
// the passthrough value changed.
10796
10800
//
@@ -10802,7 +10806,7 @@ if (__DEV__) {
10802
10806
10803
10807
if (currentStateHook !== null) {
10804
10808
// This is an update. Process the update queue.
10805
- return updateFormStateImpl (stateHook, currentStateHook, action);
10809
+ return updateActionStateImpl (stateHook, currentStateHook, action);
10806
10810
}
10807
10811
10808
10812
updateWorkInProgressHook(); // State
@@ -12055,7 +12059,7 @@ if (__DEV__) {
12055
12059
) {
12056
12060
currentHookNameInDev = "useFormState";
12057
12061
mountHookTypesDev();
12058
- return mountFormState (action, initialState);
12062
+ return mountActionState (action, initialState);
12059
12063
};
12060
12064
12061
12065
HooksDispatcherOnMountInDEV.useActionState = function useActionState(
@@ -12065,7 +12069,7 @@ if (__DEV__) {
12065
12069
) {
12066
12070
currentHookNameInDev = "useActionState";
12067
12071
mountHookTypesDev();
12068
- return mountFormState (action, initialState);
12072
+ return mountActionState (action, initialState);
12069
12073
};
12070
12074
}
12071
12075
@@ -12220,14 +12224,14 @@ if (__DEV__) {
12220
12224
function useFormState(action, initialState, permalink) {
12221
12225
currentHookNameInDev = "useFormState";
12222
12226
updateHookTypesDev();
12223
- return mountFormState (action, initialState);
12227
+ return mountActionState (action, initialState);
12224
12228
};
12225
12229
12226
12230
HooksDispatcherOnMountWithHookTypesInDEV.useActionState =
12227
12231
function useActionState(action, initialState, permalink) {
12228
12232
currentHookNameInDev = "useActionState";
12229
12233
updateHookTypesDev();
12230
- return mountFormState (action, initialState);
12234
+ return mountActionState (action, initialState);
12231
12235
};
12232
12236
}
12233
12237
@@ -12384,7 +12388,7 @@ if (__DEV__) {
12384
12388
) {
12385
12389
currentHookNameInDev = "useFormState";
12386
12390
updateHookTypesDev();
12387
- return updateFormState (action);
12391
+ return updateActionState (action);
12388
12392
};
12389
12393
12390
12394
HooksDispatcherOnUpdateInDEV.useActionState = function useActionState(
@@ -12394,7 +12398,7 @@ if (__DEV__) {
12394
12398
) {
12395
12399
currentHookNameInDev = "useActionState";
12396
12400
updateHookTypesDev();
12397
- return updateFormState (action);
12401
+ return updateActionState (action);
12398
12402
};
12399
12403
}
12400
12404
@@ -12553,7 +12557,7 @@ if (__DEV__) {
12553
12557
) {
12554
12558
currentHookNameInDev = "useFormState";
12555
12559
updateHookTypesDev();
12556
- return rerenderFormState (action);
12560
+ return rerenderActionState (action);
12557
12561
};
12558
12562
12559
12563
HooksDispatcherOnRerenderInDEV.useActionState = function useActionState(
@@ -12563,7 +12567,7 @@ if (__DEV__) {
12563
12567
) {
12564
12568
currentHookNameInDev = "useActionState";
12565
12569
updateHookTypesDev();
12566
- return rerenderFormState (action);
12570
+ return rerenderActionState (action);
12567
12571
};
12568
12572
}
12569
12573
@@ -12744,15 +12748,15 @@ if (__DEV__) {
12744
12748
currentHookNameInDev = "useFormState";
12745
12749
warnInvalidHookAccess();
12746
12750
mountHookTypesDev();
12747
- return mountFormState (action, initialState);
12751
+ return mountActionState (action, initialState);
12748
12752
};
12749
12753
12750
12754
InvalidNestedHooksDispatcherOnMountInDEV.useActionState =
12751
12755
function useActionState(action, initialState, permalink) {
12752
12756
currentHookNameInDev = "useActionState";
12753
12757
warnInvalidHookAccess();
12754
12758
mountHookTypesDev();
12755
- return mountFormState (action, initialState);
12759
+ return mountActionState (action, initialState);
12756
12760
};
12757
12761
}
12758
12762
@@ -12932,15 +12936,15 @@ if (__DEV__) {
12932
12936
currentHookNameInDev = "useFormState";
12933
12937
warnInvalidHookAccess();
12934
12938
updateHookTypesDev();
12935
- return updateFormState (action);
12939
+ return updateActionState (action);
12936
12940
};
12937
12941
12938
12942
InvalidNestedHooksDispatcherOnUpdateInDEV.useActionState =
12939
12943
function useActionState(action, initialState, permalink) {
12940
12944
currentHookNameInDev = "useActionState";
12941
12945
warnInvalidHookAccess();
12942
12946
updateHookTypesDev();
12943
- return updateFormState (action);
12947
+ return updateActionState (action);
12944
12948
};
12945
12949
}
12946
12950
@@ -13120,15 +13124,15 @@ if (__DEV__) {
13120
13124
currentHookNameInDev = "useFormState";
13121
13125
warnInvalidHookAccess();
13122
13126
updateHookTypesDev();
13123
- return rerenderFormState (action);
13127
+ return rerenderActionState (action);
13124
13128
};
13125
13129
13126
13130
InvalidNestedHooksDispatcherOnRerenderInDEV.useActionState =
13127
13131
function useActionState(action, initialState, permalink) {
13128
13132
currentHookNameInDev = "useActionState";
13129
13133
warnInvalidHookAccess();
13130
13134
updateHookTypesDev();
13131
- return rerenderFormState (action);
13135
+ return rerenderActionState (action);
13132
13136
};
13133
13137
}
13134
13138
0 commit comments