sonzai/AppContainer.js

20 lines
386 B
JavaScript

import { connect } from "react-redux";
import App from "./App";
import { setTheme } from "./actions";
const mapStateToProps = state => {
return {
theme: state.theme,
};
};
const mapDispatchToProps = dispatch => {
return {
setTheme: theme => dispatch(setTheme(theme))
};
};
const AppContainer = connect(mapStateToProps, mapDispatchToProps)(App);
export default AppContainer;