UNPKG

@warp-works/warpjs-utils

Version:

Utility functions for WarpJS and plugins

26 lines (17 loc) 926 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _reactRedux = require('react-redux'); var _errorBoundary = require('./error-boundary'); var _errorBoundary2 = _interopRequireDefault(_errorBoundary); var _baseComponentName = require('./base-component-name'); var _baseComponentName2 = _interopRequireDefault(_baseComponentName); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (Component, mapStateToProps, mapDispatchToProps, mergeProps) { // eslint-disable-next-line no-console console.error("*** DEPRECATION ***: Use wrapHookContainer"); var Container = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps, mergeProps)(Component); Container.displayName = (0, _baseComponentName2.default)(Component.displayName) + 'Container'; return (0, _errorBoundary2.default)(Container); };