Socket
Socket
Sign inDemoInstall

redux-json-router

Package Overview
Dependencies
47
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.1.0

10

lib/Link.js

@@ -14,2 +14,4 @@ 'use strict';

var _reactRedux = require('react-redux');
var _propTypes = require('prop-types');

@@ -19,4 +21,6 @@

var _reactRedux = require('react-redux');
var _reactRequiredIf = require('react-required-if');
var _reactRequiredIf2 = _interopRequireDefault(_reactRequiredIf);
var _reduxFirstRouting = require('redux-first-routing');

@@ -70,3 +74,5 @@

Link.propTypes = {
to: _propTypes2.default.string.isRequired,
to: (0, _reactRequiredIf2.default)(_propTypes2.default.string, function (props) {
return !props.action;
}),
action: _propTypes2.default.string,

@@ -73,0 +79,0 @@ onClick: _propTypes2.default.func,

27

package.json
{
"name": "redux-json-router",
"version": "1.0.0",
"version": "1.1.0",
"description": "Declarative, Redux-first routing for client-rendered React/Redux applications.",

@@ -30,3 +30,4 @@ "main": "lib/index.js",

"prop-types": "^15.5.10",
"redux-first-routing": "^0.2.1"
"react-required-if": "^1.0.1",
"redux-first-routing": "^0.2.2"
},

@@ -41,19 +42,19 @@ "devDependencies": {

"babel-register": "^6.24.1",
"chai": "^4.0.2",
"enzyme": "^2.8.1",
"chai": "^4.1.0",
"enzyme": "^2.9.1",
"eslint": "^3.19.0",
"eslint-config-airbnb": "^15.0.1",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^5.0.3",
"eslint-config-airbnb": "^15.0.2",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^5.1.1",
"eslint-plugin-react": "^7.0.1",
"istanbul": "^1.0.0-alpha.2",
"jsdom": "^11.0.0",
"jsdom": "^11.1.0",
"mocha": "^3.4.1",
"react": "^15.5.4",
"react-dom": "^15.5.4",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-redux": "^5.0.4",
"react-test-renderer": "^15.5.4",
"redux": "^3.6.0",
"react-test-renderer": "^15.6.1",
"redux": "^3.7.2",
"rimraf": "^2.6.1",
"sinon": "^2.2.0"
"sinon": "^2.3.7"
},

@@ -60,0 +61,0 @@ "peerDependencies": {

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

## Changes in version 1.x
#### State Shape
`redux-json-router` now uses the [`redux-first-routing`](https://github.com/mksarge/redux-first-routing) package internally, following its state shape:
```js
// URL: www.example.com/nested/path?with=query#and-hash
{
router: {
pathname: '/nested/path/',
search: '?with=query',
queries: {
with: 'query'
},
hash: '#and-hash'
},
... // other redux state
}
```
#### Link
The optional `replace` prop was removed. Instead, you can now specify the desired navigation action via the `action` prop:
```js
<Link to="/about" /> // default: dispatches a push action
<Link to="/about" action="replace" /> // dispatches a replace action
<Link action="goBack" /> // dispatches a goBack action
<Link action="goForward" /> // dispatches a goForward action
```
---
# Redux JSON Router

@@ -2,0 +35,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc