mirror of
				https://github.com/reduxjs/redux-devtools.git
				synced 2025-10-31 07:57:39 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			520 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			520 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| import React, { Component } from 'react';
 | |
| import { bindActionCreators } from 'redux';
 | |
| import { connect } from 'react-redux';
 | |
| import Counter from '../components/Counter';
 | |
| import * as CounterActions from '../actions/CounterActions';
 | |
| 
 | |
| @connect(state => ({
 | |
|   counter: state.counter
 | |
| }))
 | |
| export default class CounterApp extends Component {
 | |
|   render() {
 | |
|     const { counter, dispatch } = this.props;
 | |
|     return (
 | |
|       <Counter counter={counter}
 | |
|                {...bindActionCreators(CounterActions, dispatch)} />
 | |
|     );
 | |
|   }
 | |
| }
 |