Skip to content

Instantly share code, notes, and snippets.

@ryandrewjohnson
Created February 23, 2017 02:37
Show Gist options
  • Select an option

  • Save ryandrewjohnson/7b0a602683b13d3ece31353806e84e0b to your computer and use it in GitHub Desktop.

Select an option

Save ryandrewjohnson/7b0a602683b13d3ece31353806e84e0b to your computer and use it in GitHub Desktop.
import React from 'react';
import { connect } from 'react-redux';
import Alert from 'components/Alert';
import Modal from 'components/Modal';
const mapStateToProps = state => ({
isOpen: state.modals.isAlertOpen,
children: React.createElement(Alert)
});
export default connect(mapStateToProps)(Modal);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment