@@ -1022,30 +1022,15 @@ export const useEventLoop = (
10221022
10231023 // Route after the initial page hydration
10241024 useEffect ( ( ) => {
1025- // This will run when the location changes
1026- if (
1027- location . pathname + location . search + location . hash !==
1028- prevLocationRef . current . pathname +
1029- prevLocationRef . current . search +
1030- prevLocationRef . current . hash
1031- ) {
1032- // Equivalent to routeChangeStart - runs when navigation begins
1033- const change_start = ( ) => {
1034- const main_state_dispatch = dispatch [ "reflex___state____state" ] ;
1035- if ( main_state_dispatch !== undefined ) {
1036- main_state_dispatch ( { is_hydrated_rx_state_ : false } ) ;
1037- }
1038- } ;
1039- change_start ( ) ;
1040-
1041- // Equivalent to routeChangeComplete - runs after navigation completes
1042- const change_complete = ( ) => addEvents ( onLoadInternalEvent ( ) ) ;
1043- change_complete ( ) ;
1044-
1045- // Update the ref
1046- prevLocationRef . current = location ;
1025+ // Equivalent to routeChangeStart - runs when navigation begins
1026+ const main_state_dispatch = dispatch [ "reflex___state____state" ] ;
1027+ if ( main_state_dispatch !== undefined ) {
1028+ main_state_dispatch ( { is_hydrated_rx_state_ : false } ) ;
10471029 }
1048- } , [ location , dispatch , onLoadInternalEvent , addEvents ] ) ;
1030+
1031+ // Equivalent to routeChangeComplete - runs after navigation completes
1032+ addEvents ( onLoadInternalEvent ( ) ) ;
1033+ } , [ location ] ) ;
10491034
10501035 return [ addEvents , connectErrors ] ;
10511036} ;
0 commit comments