mirror of
				https://github.com/reduxjs/redux-devtools.git
				synced 2025-11-04 01:47:25 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
		
			297 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			297 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
import { INCREMENT_COUNTER, DECREMENT_COUNTER } from '../actions/counter';
 | 
						|
 | 
						|
export default function counter(state = 0, action) {
 | 
						|
  switch (action.type) {
 | 
						|
    case INCREMENT_COUNTER:
 | 
						|
      return state + 1;
 | 
						|
    case DECREMENT_COUNTER:
 | 
						|
      return state - 1;
 | 
						|
    default:
 | 
						|
      return state;
 | 
						|
  }
 | 
						|
}
 |