Socket
Socket
Sign inDemoInstall

@sanity/state-router

Package Overview
Dependencies
Maintainers
6
Versions
702
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sanity/state-router - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

4

lib/components/RouterProvider.js

@@ -59,2 +59,3 @@ 'use strict';

var location = _props.location;
var state = _props.state;

@@ -68,3 +69,3 @@ return {

navigate: this.navigateState,
state: router.decode(location.pathname)
state: state || router.decode(location.pathname)
}

@@ -89,2 +90,3 @@ };

}),
state: _react.PropTypes.object,
children: _react.PropTypes.node

@@ -91,0 +93,0 @@ };

{
"name": "@sanity/state-router",
"version": "0.1.0",
"version": "0.1.1",
"description": "A path pattern => state object bidirectional mapper",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -10,2 +10,3 @@ import React, {PropTypes} from 'react'

}),
state: PropTypes.object,
children: PropTypes.node

@@ -28,3 +29,3 @@ }

getChildContext() {
const {router, location} = this.props
const {router, location, state} = this.props
return {

@@ -37,3 +38,3 @@ __internalRouter: {

navigate: this.navigateState,
state: router.decode(location.pathname)
state: state || router.decode(location.pathname)
}

@@ -40,0 +41,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