Last active
February 21, 2018 09:37
-
-
Save jorgeortega/1f83cf6823276577ae3d3097d38bc8ab to your computer and use it in GitHub Desktop.
React Redux Simple Container Component
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, { Component } from 'react' | |
import { string } from 'prop-types' | |
import { connect } from 'react-redux' | |
import { openModal } from 'actions/modal' | |
import SimpleModal from './index.js' | |
export class SimpleModalContainer extends Component { | |
constructor (props) { | |
super(props) | |
} | |
render () { | |
return ( | |
<SimpleModal /> | |
) | |
} | |
} | |
SimpleModalContainer.propTypes = { | |
modalMessage: string | |
} | |
export const mapStateToProps = ({ modalMessage }) => ({ modalMessage }) | |
export default connect(mapStateToProps, { openModal })(SimpleModalContainer) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment