Last active
October 14, 2018 20:13
-
-
Save pahund/1b9974edae354b7509be672ad4c4f7a7 to your computer and use it in GitHub Desktop.
Connected About Page Component, Dispatching an Action to the Hacker News Brick Component
This file contains hidden or 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 { HackerNews, loadTopStoriesAction } from '@modular-toolkit/demo-module'; | |
const AboutPage = ({ dispatch }) => ( | |
<main> | |
<header> | |
<h1>About Our Company</h1> | |
</header> | |
<p>We are very awesome!</p> | |
<HackerNews /> | |
<button onClick={() => dispatch(loadTopStoriesAction())}>update</button> | |
</main> | |
); | |
export default connect()(AboutPage); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment