Skip to content

Instantly share code, notes, and snippets.

@LiamDotPro
Created February 23, 2017 07:09
Show Gist options
  • Save LiamDotPro/073566376e2cfa6e93224c1b064d9f7c to your computer and use it in GitHub Desktop.
Save LiamDotPro/073566376e2cfa6e93224c1b064d9f7c to your computer and use it in GitHub Desktop.
Why can't I get redux to print out the state?
import React from "react";
import {connect} from "react-redux";
import NewsPane from './NewsPane.js';
import UserPane from './UserPane.js';
const counter = (state = 20, action) => {
switch (action.type) {
case 'GET_MORE_ARTICLES':
return state + 20;
default:
return state;
}
}
export default class HomePane extends React.Component {
render() {
const store = connect(counter);
console.log(store);
return (
<div className="row home-pane-panel">
<UserPane />
<NewsPane />
</div>
);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment