Created
November 16, 2017 17:24
-
-
Save craigayre/53434b74fe64f1cb186011aacf6be524 to your computer and use it in GitHub Desktop.
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 PropTypes from 'prop-types' | |
import Page from '../components/page'; | |
export class Index extends React.Component { | |
static contextTypes = { | |
store: PropTypes.object, | |
} | |
render() { | |
return ( | |
<div> | |
<div className="hero"> | |
{JSON.stringify(this.context.store)} | |
</div> | |
<style jsx>{` | |
`}</style> | |
</div> | |
) | |
} | |
} | |
// Or, instead of static | |
// Index.contextTypes = { store: PropTypes.object } | |
export default connect(null)(Page(Index)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment