1- import { Component , createElement } from 'react'
2- import storeShape from '../utils/storeShape'
3- import shallowEqual from '../utils/shallowEqual'
4- import isPlainObject from '../utils/isPlainObject'
5- import wrapActionCreators from '../utils/wrapActionCreators'
6- import hoistStatics from 'hoist-non-react-statics'
7- import invariant from 'invariant'
1+ const { Component, createElement } = require ( 'react' )
2+ const storeShape = require ( '../utils/storeShape' )
3+ const shallowEqual = require ( '../utils/shallowEqual' )
4+ const isPlainObject = require ( '../utils/isPlainObject' )
5+ const wrapActionCreators = require ( '../utils/wrapActionCreators' )
6+ const hoistStatics = require ( 'hoist-non-react-statics' )
7+ const invariant = require ( 'invariant' )
88
99const defaultMapStateToProps = state => ( { } ) // eslint-disable-line no-unused-vars
1010const defaultMapDispatchToProps = dispatch => ( { dispatch } )
@@ -21,7 +21,7 @@ function getDisplayName(WrappedComponent) {
2121// Helps track hot reloading.
2222let nextVersion = 0
2323
24- export default function connect ( mapStateToProps , mapDispatchToProps , mergeProps , options = { } ) {
24+ function connect ( mapStateToProps , mapDispatchToProps , mergeProps , options = { } ) {
2525 const shouldSubscribe = Boolean ( mapStateToProps )
2626 const finalMapStateToProps = mapStateToProps || defaultMapStateToProps
2727 const finalMapDispatchToProps = isPlainObject ( mapDispatchToProps ) ?
@@ -273,3 +273,5 @@ export default function connect(mapStateToProps, mapDispatchToProps, mergeProps,
273273 return hoistStatics ( Connect , WrappedComponent )
274274 }
275275}
276+
277+ module . exports = connect
0 commit comments