Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-redux-subspace

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-redux-subspace - npm Package Compare versions

Comparing version 3.0.1 to 3.1.0

src/components/parentSpaced.js

56

es/index.js
import React, { Children } from 'react';
import PropTypes from 'prop-types';
import { subspace } from 'redux-subspace';
import { subspace, parentSpace } from 'redux-subspace';
import hoistNonReactStatics from 'hoist-non-react-statics';

@@ -79,2 +79,36 @@ import wrapDisplayName from 'recompose/wrapDisplayName';

var ParentSpaceProvider =
/*#__PURE__*/
function (_React$PureComponent) {
_inheritsLoose(ParentSpaceProvider, _React$PureComponent);
function ParentSpaceProvider() {
return _React$PureComponent.apply(this, arguments) || this;
}
var _proto = ParentSpaceProvider.prototype;
_proto.getChildContext = function getChildContext() {
return {
store: parentSpace(this.context.store)
};
};
_proto.render = function render() {
return Children.only(this.props.children);
};
return ParentSpaceProvider;
}(React.PureComponent);
ParentSpaceProvider.propTypes = {
children: PropTypes.element.isRequired
};
ParentSpaceProvider.contextTypes = {
store: PropTypes.object.isRequired
};
ParentSpaceProvider.childContextTypes = {
store: PropTypes.object
};
/**

@@ -88,2 +122,20 @@ * Copyright 2017, IOOF Holdings Limited.

export { subspaced, SubspaceProvider };
var parentSpaced = function parentSpaced(WrappedComponent) {
var ParentSpacedComponent = function ParentSpacedComponent(props) {
return React.createElement(ParentSpaceProvider, null, React.createElement(WrappedComponent, props));
};
hoistNonReactStatics(ParentSpacedComponent, WrappedComponent);
ParentSpacedComponent.displayName = wrapDisplayName(WrappedComponent, 'ParentSpaced');
return ParentSpacedComponent;
};
/**
* Copyright 2017, IOOF Holdings Limited.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
export { subspaced, parentSpaced, SubspaceProvider, ParentSpaceProvider };

@@ -86,2 +86,36 @@ 'use strict';

var ParentSpaceProvider =
/*#__PURE__*/
function (_React$PureComponent) {
_inheritsLoose(ParentSpaceProvider, _React$PureComponent);
function ParentSpaceProvider() {
return _React$PureComponent.apply(this, arguments) || this;
}
var _proto = ParentSpaceProvider.prototype;
_proto.getChildContext = function getChildContext() {
return {
store: reduxSubspace.parentSpace(this.context.store)
};
};
_proto.render = function render() {
return React.Children.only(this.props.children);
};
return ParentSpaceProvider;
}(React__default.PureComponent);
ParentSpaceProvider.propTypes = {
children: PropTypes.element.isRequired
};
ParentSpaceProvider.contextTypes = {
store: PropTypes.object.isRequired
};
ParentSpaceProvider.childContextTypes = {
store: PropTypes.object
};
/**

@@ -95,3 +129,23 @@ * Copyright 2017, IOOF Holdings Limited.

var parentSpaced = function parentSpaced(WrappedComponent) {
var ParentSpacedComponent = function ParentSpacedComponent(props) {
return React__default.createElement(ParentSpaceProvider, null, React__default.createElement(WrappedComponent, props));
};
hoistNonReactStatics(ParentSpacedComponent, WrappedComponent);
ParentSpacedComponent.displayName = wrapDisplayName(WrappedComponent, 'ParentSpaced');
return ParentSpacedComponent;
};
/**
* Copyright 2017, IOOF Holdings Limited.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
exports.subspaced = subspaced;
exports.parentSpaced = parentSpaced;
exports.SubspaceProvider = SubspaceProvider;
exports.ParentSpaceProvider = ParentSpaceProvider;

6

package.json
{
"name": "react-redux-subspace",
"version": "3.0.1",
"version": "3.1.0",
"description": "react-redux Provider extension for redux-subspace",

@@ -38,3 +38,3 @@ "author": "Michael Peyper",

"recompose": "^0.30.0",
"redux-subspace": "^3.0.1"
"redux-subspace": "^3.1.0"
},

@@ -86,3 +86,3 @@ "peerDependencies": {

},
"gitHead": "0ef4fae05d882b62b0806d18c71a8a7cf0f2d209"
"gitHead": "2992b3590c54e0079ccb02ac55daeeae5cc98037"
}

@@ -34,1 +34,5 @@ /**

export class SubspaceProvider<TParentState, TRootState, TSubState> extends React.Component<SubspaceProviderProps<TParentState, TRootState, TSubState>> { }
export const parentSpaced: ComponentDecorator;
export class ParentSpaceProvider extends React.Component { }

@@ -10,2 +10,4 @@ /**

export { default as subspaced } from './components/subspaced'
export { default as parentSpaced } from './components/parentSpaced'
export { default as SubspaceProvider } from './components/SubspaceProvider'
export { default as ParentSpaceProvider } from './components/ParentSpaceProvider'
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc