@@ -389,7 +389,7 @@ export interface RouterProviderProps {
389389 * - When set to `false`, the router will not leverage `React.startTransition` or
390390 * `React.useOptimistic` on navigations or state changes.
391391 */
392- unstable_transitions ?: boolean ;
392+ unstable_useTransitions ?: boolean ;
393393}
394394
395395function shallowDiff ( a : any , b : any ) {
@@ -413,7 +413,7 @@ export function UNSTABLE_TransitionEnabledRouterProvider({
413413 router,
414414 flushSync : reactDomFlushSyncImpl ,
415415 unstable_onError,
416- } : Omit < RouterProviderProps , "unstable_transitions " > ) : React . ReactElement {
416+ } : Omit < RouterProviderProps , "unstable_useTransitions " > ) : React . ReactElement {
417417 let fetcherData = React . useRef < Map < string , any > > ( new Map ( ) ) ;
418418 let [ revalidating , startRevalidation ] = React . useTransition ( ) ;
419419 let [ state , setState ] = React . useState ( router . state ) ;
@@ -512,7 +512,7 @@ export function UNSTABLE_TransitionEnabledRouterProvider({
512512 location = { state . location }
513513 navigationType = { state . historyAction }
514514 navigator = { navigator }
515- unstable_transitions = { true }
515+ unstable_useTransitions = { true }
516516 >
517517 < MemoizedDataRoutes
518518 routes = { router . routes }
@@ -559,14 +559,14 @@ export function UNSTABLE_TransitionEnabledRouterProvider({
559559 * @param {RouterProviderProps.flushSync } props.flushSync n/a
560560 * @param {RouterProviderProps.unstable_onError } props.unstable_onError n/a
561561 * @param {RouterProviderProps.router } props.router n/a
562- * @param {RouterProviderProps.unstable_transitions } props.unstable_transitions n/a
562+ * @param {RouterProviderProps.unstable_useTransitions } props.unstable_useTransitions n/a
563563 * @returns React element for the rendered router
564564 */
565565export function RouterProvider ( {
566566 router,
567567 flushSync : reactDomFlushSyncImpl ,
568568 unstable_onError,
569- unstable_transitions ,
569+ unstable_useTransitions ,
570570} : RouterProviderProps ) : React . ReactElement {
571571 let [ _state , setStateImpl ] = React . useState ( router . state ) ;
572572 let [ state , setOptimisticState ] = useOptimisticSafe ( _state ) ;
@@ -641,11 +641,11 @@ export function RouterProvider({
641641 if ( ! viewTransitionOpts || ! isViewTransitionAvailable ) {
642642 if ( reactDomFlushSyncImpl && flushSync ) {
643643 reactDomFlushSyncImpl ( ( ) => logErrorsAndSetState ( newState ) ) ;
644- } else if ( unstable_transitions === false ) {
644+ } else if ( unstable_useTransitions === false ) {
645645 logErrorsAndSetState ( newState ) ;
646646 } else {
647647 React . startTransition ( ( ) => {
648- if ( unstable_transitions === true ) {
648+ if ( unstable_useTransitions === true ) {
649649 setOptimisticState ( ( s ) => getOptimisticRouterState ( s , newState ) ) ;
650650 }
651651 logErrorsAndSetState ( newState ) ;
@@ -718,7 +718,7 @@ export function RouterProvider({
718718 transition ,
719719 renderDfd ,
720720 logErrorsAndSetState ,
721- unstable_transitions ,
721+ unstable_useTransitions ,
722722 setOptimisticState ,
723723 ] ,
724724 ) ;
@@ -743,11 +743,11 @@ export function RouterProvider({
743743 let newState = pendingState ;
744744 let renderPromise = renderDfd . promise ;
745745 let transition = router . window . document . startViewTransition ( async ( ) => {
746- if ( unstable_transitions === false ) {
746+ if ( unstable_useTransitions === false ) {
747747 logErrorsAndSetState ( newState ) ;
748748 } else {
749749 React . startTransition ( ( ) => {
750- if ( unstable_transitions === true ) {
750+ if ( unstable_useTransitions === true ) {
751751 setOptimisticState ( ( s ) => getOptimisticRouterState ( s , newState ) ) ;
752752 }
753753 logErrorsAndSetState ( newState ) ;
@@ -768,7 +768,7 @@ export function RouterProvider({
768768 renderDfd ,
769769 router . window ,
770770 logErrorsAndSetState ,
771- unstable_transitions ,
771+ unstable_useTransitions ,
772772 setOptimisticState ,
773773 ] ) ;
774774
@@ -848,7 +848,7 @@ export function RouterProvider({
848848 location = { state . location }
849849 navigationType = { state . historyAction }
850850 navigator = { navigator }
851- unstable_transitions = { unstable_transitions === true }
851+ unstable_useTransitions = { unstable_useTransitions === true }
852852 >
853853 < MemoizedDataRoutes
854854 routes = { router . routes }
@@ -935,7 +935,7 @@ export interface MemoryRouterProps {
935935 * [`React.startTransition`](https://react.dev/reference/react/startTransition).
936936 * Enabled by default.
937937 */
938- unstable_transitions ?: boolean ;
938+ unstable_useTransitions ?: boolean ;
939939}
940940
941941/**
@@ -949,7 +949,7 @@ export interface MemoryRouterProps {
949949 * @param {MemoryRouterProps.children } props.children n/a
950950 * @param {MemoryRouterProps.initialEntries } props.initialEntries n/a
951951 * @param {MemoryRouterProps.initialIndex } props.initialIndex n/a
952- * @param {MemoryRouterProps.unstable_transitions } props.unstable_transitions n/a
952+ * @param {MemoryRouterProps.unstable_useTransitions } props.unstable_useTransitions n/a
953953 * @returns A declarative in-memory {@link Router | `<Router>`} for client-side
954954 * routing.
955955 */
@@ -958,7 +958,7 @@ export function MemoryRouter({
958958 children,
959959 initialEntries,
960960 initialIndex,
961- unstable_transitions ,
961+ unstable_useTransitions ,
962962} : MemoryRouterProps ) : React . ReactElement {
963963 let historyRef = React . useRef < MemoryHistory > ( ) ;
964964 if ( historyRef . current == null ) {
@@ -976,13 +976,13 @@ export function MemoryRouter({
976976 } ) ;
977977 let setState = React . useCallback (
978978 ( newState : { action : NavigationType ; location : Location } ) => {
979- if ( unstable_transitions === false ) {
979+ if ( unstable_useTransitions === false ) {
980980 setStateImpl ( newState ) ;
981981 } else {
982982 React . startTransition ( ( ) => setStateImpl ( newState ) ) ;
983983 }
984984 } ,
985- [ unstable_transitions ] ,
985+ [ unstable_useTransitions ] ,
986986 ) ;
987987
988988 React . useLayoutEffect ( ( ) => history . listen ( setState ) , [ history , setState ] ) ;
@@ -994,7 +994,7 @@ export function MemoryRouter({
994994 location = { state . location }
995995 navigationType = { state . action }
996996 navigator = { history }
997- unstable_transitions = { unstable_transitions === true }
997+ unstable_useTransitions = { unstable_useTransitions === true }
998998 />
999999 ) ;
10001000}
@@ -1411,7 +1411,7 @@ export interface RouterProps {
14111411 /**
14121412 * Whether this router should wrap navigations in `React.startTransition()`
14131413 */
1414- unstable_transitions : boolean ;
1414+ unstable_useTransitions : boolean ;
14151415}
14161416
14171417/**
@@ -1431,7 +1431,7 @@ export interface RouterProps {
14311431 * @param {RouterProps.navigationType } props.navigationType n/a
14321432 * @param {RouterProps.navigator } props.navigator n/a
14331433 * @param {RouterProps.static } props.static n/a
1434- * @param {RouterProps.unstable_transitions } props.unstable_transitions n/a
1434+ * @param {RouterProps.unstable_useTransitions } props.unstable_useTransitions n/a
14351435 * @returns React element for the rendered router or `null` if the location does
14361436 * not match the {@link props.basename}
14371437 */
@@ -1442,7 +1442,7 @@ export function Router({
14421442 navigationType = NavigationType . Pop ,
14431443 navigator,
14441444 static : staticProp = false ,
1445- unstable_transitions ,
1445+ unstable_useTransitions ,
14461446} : RouterProps ) : React . ReactElement | null {
14471447 invariant (
14481448 ! useInRouterContext ( ) ,
@@ -1458,10 +1458,10 @@ export function Router({
14581458 basename,
14591459 navigator,
14601460 static : staticProp ,
1461- unstable_transitions ,
1461+ unstable_useTransitions ,
14621462 future : { } ,
14631463 } ) ,
1464- [ basename , navigator , staticProp , unstable_transitions ] ,
1464+ [ basename , navigator , staticProp , unstable_useTransitions ] ,
14651465 ) ;
14661466
14671467 if ( typeof locationProp === "string" ) {
0 commit comments