mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-25 19:13:56 +03:00
24 lines
571 B
JavaScript
24 lines
571 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';
|
|
|
|
class CounterApp extends Component {
|
|
render() {
|
|
const { counter, dispatch } = this.props;
|
|
return (
|
|
<Counter counter={counter}
|
|
{...bindActionCreators(CounterActions, dispatch)} />
|
|
);
|
|
}
|
|
}
|
|
|
|
function select(state) {
|
|
return {
|
|
counter: state.counter
|
|
};
|
|
}
|
|
|
|
export default connect(select)(CounterApp);
|