-
-
Save LiamDotPro/073566376e2cfa6e93224c1b064d9f7c to your computer and use it in GitHub Desktop.
Why can't I get redux to print out the state?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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