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

react-router-redux

Package Overview
Dependencies
Maintainers
4
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-router-redux - npm Package Compare versions

Comparing version 5.0.0-alpha.4 to 5.0.0-alpha.5

12

ConnectedRouter.js

@@ -9,2 +9,6 @@ 'use strict';

var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _reactRouter = require('react-router');

@@ -65,9 +69,9 @@

ConnectedRouter.propTypes = {
store: _react.PropTypes.object,
history: _react.PropTypes.object,
children: _react.PropTypes.node
store: _propTypes2.default.object,
history: _propTypes2.default.object,
children: _propTypes2.default.node
};
ConnectedRouter.contextTypes = {
store: _react.PropTypes.object
store: _propTypes2.default.object
};
exports.default = ConnectedRouter;

@@ -7,3 +7,4 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Router } from 'react-router';

@@ -10,0 +11,0 @@

{
"name": "react-router-redux",
"version": "5.0.0-alpha.4",
"version": "5.0.0-alpha.5",
"description": "Redux bindings for React Router",

@@ -35,3 +35,4 @@ "repository": "ReactTraining/react-router",

"history": "^4.5.1",
"react-router": "^4.0.0"
"prop-types": "^15.5.4",
"react-router": "^4.1.0"
},

@@ -38,0 +39,0 @@ "devDependencies": {

(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-router')) :
typeof define === 'function' && define.amd ? define(['exports', 'react', 'react-router'], factory) :
(factory((global.ReactRouterRedux = global.ReactRouterRedux || {}),global.React,global.ReactRouter));
}(this, (function (exports,React,reactRouter) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('prop-types'), require('react-router')) :
typeof define === 'function' && define.amd ? define(['exports', 'react', 'prop-types', 'react-router'], factory) :
(factory((global.ReactRouterRedux = global.ReactRouterRedux || {}),global.React,global.PropTypes,global.ReactRouter));
}(this, (function (exports,React,PropTypes,reactRouter) { 'use strict';
var React__default = 'default' in React ? React['default'] : React;
PropTypes = 'default' in PropTypes ? PropTypes['default'] : PropTypes;

@@ -90,8 +91,8 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

ConnectedRouter.propTypes = {
store: React.PropTypes.object,
history: React.PropTypes.object,
children: React.PropTypes.node
store: PropTypes.object,
history: PropTypes.object,
children: PropTypes.node
};
ConnectedRouter.contextTypes = {
store: React.PropTypes.object
store: PropTypes.object
};

@@ -98,0 +99,0 @@

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-router")):"function"==typeof define&&define.amd?define(["exports","react","react-router"],t):t(e.ReactRouterRedux=e.ReactRouterRedux||{},e.React,e.ReactRouter)}(this,function(e,t,o){"use strict";function r(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:l,t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},o=t.type,r=t.payload;return o===f?s({},e,{location:r}):e}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){return function(){for(var t=arguments.length,o=Array(t),r=0;t>r;r++)o[r]=arguments[r];return{type:h,payload:{method:e,args:o}}}}function c(e){return function(){return function(t){return function(o){if(o.type!==h)return t(o);var r=o.payload;e[r.method].apply(e,r.args)}}}}var p="default"in t?t["default"]:t,s=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},f="@@router/LOCATION_CHANGE",l={location:null},y=function(e){function t(){var o,r,a;n(this,t);for(var u=arguments.length,c=Array(u),p=0;u>p;p++)c[p]=arguments[p];return o=r=i(this,e.call.apply(e,[this].concat(c))),r.handleLocationChange=function(e){r.store.dispatch({type:f,payload:e})},a=o,i(r,a)}return a(t,e),t.prototype.componentWillMount=function(){var e=this.props,t=e.store,o=e.history;this.store=t||this.context.store,this.unsubscribeFromHistory=o.listen(this.handleLocationChange),this.handleLocationChange(o.location)},t.prototype.componentWillUnmount=function(){this.unsubscribeFromHistory&&this.unsubscribeFromHistory()},t.prototype.render=function(){return p.createElement(o.Router,this.props)},t}(t.Component);y.propTypes={store:t.PropTypes.object,history:t.PropTypes.object,children:t.PropTypes.node},y.contextTypes={store:t.PropTypes.object};var h="@@router/CALL_HISTORY_METHOD",d=u("push"),b=u("replace"),g=u("go"),O=u("goBack"),R=u("goForward"),m={push:d,replace:b,go:g,goBack:O,goForward:R};e.ConnectedRouter=y,e.routerMiddleware=c,e.LOCATION_CHANGE=f,e.routerReducer=r,e.CALL_HISTORY_METHOD=h,e.push=d,e.replace=b,e.go=g,e.goBack=O,e.goForward=R,e.routerActions=m,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("react-router")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","react-router"],t):t(e.ReactRouterRedux=e.ReactRouterRedux||{},e.React,e.PropTypes,e.ReactRouter)}(this,function(e,t,o,r){"use strict";function n(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:d,t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},o=t.type,r=t.payload;return o===l?f({},e,{location:r}):e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(e){return function(){for(var t=arguments.length,o=Array(t),r=0;t>r;r++)o[r]=arguments[r];return{type:y,payload:{method:e,args:o}}}}function p(e){return function(){return function(t){return function(o){if(o.type!==y)return t(o);var r=o.payload;e[r.method].apply(e,r.args)}}}}var s="default"in t?t["default"]:t;o="default"in o?o["default"]:o;var f=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},l="@@router/LOCATION_CHANGE",d={location:null},h=function(e){function t(){var o,r,n;i(this,t);for(var u=arguments.length,c=Array(u),p=0;u>p;p++)c[p]=arguments[p];return o=r=a(this,e.call.apply(e,[this].concat(c))),r.handleLocationChange=function(e){r.store.dispatch({type:l,payload:e})},n=o,a(r,n)}return u(t,e),t.prototype.componentWillMount=function(){var e=this.props,t=e.store,o=e.history;this.store=t||this.context.store,this.unsubscribeFromHistory=o.listen(this.handleLocationChange),this.handleLocationChange(o.location)},t.prototype.componentWillUnmount=function(){this.unsubscribeFromHistory&&this.unsubscribeFromHistory()},t.prototype.render=function(){return s.createElement(r.Router,this.props)},t}(t.Component);h.propTypes={store:o.object,history:o.object,children:o.node},h.contextTypes={store:o.object};var y="@@router/CALL_HISTORY_METHOD",b=c("push"),g=c("replace"),O=c("go"),R=c("goBack"),m=c("goForward"),v={push:b,replace:g,go:O,goBack:R,goForward:m};e.ConnectedRouter=h,e.routerMiddleware=p,e.LOCATION_CHANGE=l,e.routerReducer=n,e.CALL_HISTORY_METHOD=y,e.push=b,e.replace=g,e.go=O,e.goBack=R,e.goForward=m,e.routerActions=v,Object.defineProperty(e,"__esModule",{value:!0})});
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