File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed
app/components/StateRoute/ComponentMap Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -520,12 +520,12 @@ export default function ComponentMap({
520520 }
521521 />
522522 { /* Add this new container for reducer state */ }
523- { tooltipData . componentData . reducerState && (
523+ { /* { tooltipData.componentData.reducerState && (
524524 <ToolTipDataDisplay
525525 containerName='Reducer State'
526526 dataObj={tooltipData.componentData.reducerState}
527527 />
528- ) }
528+ )} */ }
529529 </ div >
530530 </ div >
531531 </ TooltipInPortal >
Original file line number Diff line number Diff line change @@ -222,14 +222,14 @@ export default function createTree(currentFiberNode: Fiber): Tree {
222222 if ( isReducer ) {
223223 // If it's a reducer, store its state
224224 componentData . reducerState = state ;
225- } else {
226- // Otherwise treat as useState
227- componentData . hooksState [ hooksNames [ i ] ?. varName || `state${ i } ` ] = state ;
228225 }
226+ // Otherwise treat as useState
227+ componentData . hooksState [ hooksNames [ i ] ?. varName || `Reducer: ${ i } ` ] = state ;
229228 } ) ;
230229
231230 // Pass to front end
232- newState = componentData . reducerState || componentData . hooksState ;
231+ newState = componentData . hooksState ;
232+ console . log ( 'new state' , newState ) ;
233233 } catch ( err ) {
234234 console . log ( 'Error extracting functional component state:' , {
235235 componentName,
Original file line number Diff line number Diff line change @@ -80,9 +80,7 @@ export function getHooksStateAndUpdateMethod(
8080 state : memoizedState . memoizedState ,
8181 isReducer : true ,
8282 } ) ;
83- }
84- // Existing useState check
85- if ( memoizedState . queue ) {
83+ } else if ( memoizedState . queue ) {
8684 hooksStates . push ( {
8785 component : memoizedState . queue ,
8886 state : memoizedState . memoizedState ,
You can’t perform that action at this time.
0 commit comments