mirror of
				https://github.com/reduxjs/redux-devtools.git
				synced 2025-10-30 15:37:31 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			432 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			432 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| import { bindActionCreators } from 'redux';
 | |
| import { connect } from 'react-redux';
 | |
| import Counter from '../components/Counter';
 | |
| import * as CounterActions from '../actions/counter';
 | |
| 
 | |
| function mapStateToProps(state) {
 | |
|   return {
 | |
|     counter: state.counter,
 | |
|   };
 | |
| }
 | |
| 
 | |
| function mapDispatchToProps(dispatch) {
 | |
|   return bindActionCreators(CounterActions, dispatch);
 | |
| }
 | |
| 
 | |
| export default connect(mapStateToProps, mapDispatchToProps)(Counter);
 |