context: path.join(__dirname, "/"),
entry: ["babel-polyfill", "./src/index.js"],
output: {
path: path.resolve(__dirname, "dist"),
filename: "[name].js"
// publicPath: "./public/" // название директории
},
devServer: {
contentBase: "./public",
// outputPath: BUILD_DIR,
// hot: true,
historyApiFallback: true
},
function mapStateToProps(state) {
return {
notifications: state.notifications,
menu: state.menu,
balance: state.balance,
users: state.users //Тут у меня коннект юзеров
};
}
componentDidMount() {
console.log(this.props.users); // выводит пустой array
this.props.fetchNotifications();
this.props.fetchBalance(this.state.user);
}
render() {
console.log(this.props.users); // тут сначала [], потом данные