mirror of
				https://github.com/reduxjs/redux-devtools.git
				synced 2025-10-31 07:57:39 +03:00 
			
		
		
		
	Rename variable
This commit is contained in:
		
							parent
							
								
									e9e951412f
								
							
						
					
					
						commit
						ddeda5d4d6
					
				|  | @ -78,13 +78,13 @@ function recomputeStates(reducer, committedState, stagedActions, skippedActions) | ||||||
| /** | /** | ||||||
|  * Lifts the app state reducer into a DevTools state reducer. |  * Lifts the app state reducer into a DevTools state reducer. | ||||||
|  */ |  */ | ||||||
| function liftReducer(reducer, monitorStateReducer, initialState) { | function liftReducer(reducer, monitorReducer, initialState) { | ||||||
|   const initialLiftedState = { |   const initialLiftedState = { | ||||||
|     committedState: initialState, |     committedState: initialState, | ||||||
|     stagedActions: [INIT_ACTION], |     stagedActions: [INIT_ACTION], | ||||||
|     skippedActions: {}, |     skippedActions: {}, | ||||||
|     currentStateIndex: 0, |     currentStateIndex: 0, | ||||||
|     monitorState: monitorStateReducer(undefined, INIT_ACTION), |     monitorState: monitorReducer(undefined, INIT_ACTION), | ||||||
|     timestamps: [Date.now()] |     timestamps: [Date.now()] | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|  | @ -160,7 +160,7 @@ function liftReducer(reducer, monitorStateReducer, initialState) { | ||||||
|       skippedActions |       skippedActions | ||||||
|     ); |     ); | ||||||
| 
 | 
 | ||||||
|     monitorState = monitorStateReducer(monitorState, liftedAction); |     monitorState = monitorReducer(monitorState, liftedAction); | ||||||
| 
 | 
 | ||||||
|     return { |     return { | ||||||
|       committedState, |       committedState, | ||||||
|  | @ -198,7 +198,7 @@ function unliftState(liftedState) { | ||||||
| /** | /** | ||||||
|  * Unlifts the DevTools store to act like the app's store. |  * Unlifts the DevTools store to act like the app's store. | ||||||
|  */ |  */ | ||||||
| function unliftStore(liftedStore, monitorStateReducer) { | function unliftStore(liftedStore, monitorReducer) { | ||||||
|   let lastDefinedState; |   let lastDefinedState; | ||||||
|   return { |   return { | ||||||
|     ...liftedStore, |     ...liftedStore, | ||||||
|  | @ -215,7 +215,7 @@ function unliftStore(liftedStore, monitorStateReducer) { | ||||||
|       return lastDefinedState; |       return lastDefinedState; | ||||||
|     }, |     }, | ||||||
|     replaceReducer(nextReducer) { |     replaceReducer(nextReducer) { | ||||||
|       liftedStore.replaceReducer(liftReducer(nextReducer, monitorStateReducer)); |       liftedStore.replaceReducer(liftReducer(nextReducer, monitorReducer)); | ||||||
|     } |     } | ||||||
|   }; |   }; | ||||||
| } | } | ||||||
|  | @ -252,13 +252,13 @@ export const ActionCreators = { | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Redux DevTools middleware. |  * Redux DevTools store enhancer. | ||||||
|  */ |  */ | ||||||
| export default function devTools(monitorStateReducer = () => undefined) { | export default function devTools(monitorReducer = () => undefined) { | ||||||
|   return next => (reducer, initialState) => { |   return next => (reducer, initialState) => { | ||||||
|     const liftedReducer = liftReducer(reducer, monitorStateReducer, initialState); |     const liftedReducer = liftReducer(reducer, monitorReducer, initialState); | ||||||
|     const liftedStore = next(liftedReducer); |     const liftedStore = next(liftedReducer); | ||||||
|     const store = unliftStore(liftedStore, monitorStateReducer); |     const store = unliftStore(liftedStore, monitorReducer); | ||||||
|     return store; |     return store; | ||||||
|   }; |   }; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user