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

react-router-tools

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-router-tools - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

9

es/index.js

@@ -46,9 +46,12 @@ import React from 'react';

var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
renderFn = _ref2.render;
renderFn = _ref2.render,
overrideComponent = _ref2.component;
var child = null;
var useComponent = overrideComponent || component;
if (renderFn || render) {
child = React.createElement(Route, { key: fullPath, path: fullPath, render: renderFn || render, exact: exact });
} else if (component) {
child = React.createElement(Route, { key: fullPath, path: fullPath, component: component, exact: exact });
} else if (useComponent) {
child = React.createElement(Route, { key: fullPath, path: fullPath, component: useComponent, exact: exact });
} else {

@@ -55,0 +58,0 @@ child = React.createElement(

@@ -64,9 +64,12 @@ 'use strict';

var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
renderFn = _ref2.render;
renderFn = _ref2.render,
overrideComponent = _ref2.component;
var child = null;
var useComponent = overrideComponent || component;
if (renderFn || render) {
child = _react2.default.createElement(_reactRouter.Route, { key: fullPath, path: fullPath, render: renderFn || render, exact: exact });
} else if (component) {
child = _react2.default.createElement(_reactRouter.Route, { key: fullPath, path: fullPath, component: component, exact: exact });
} else if (useComponent) {
child = _react2.default.createElement(_reactRouter.Route, { key: fullPath, path: fullPath, component: useComponent, exact: exact });
} else {

@@ -73,0 +76,0 @@ child = _react2.default.createElement(

{
"name": "react-router-tools",
"version": "1.0.3",
"version": "1.0.4",
"description": "A collection of assorted React Router(v4) utility functions",

@@ -5,0 +5,0 @@ "author": "Fredrik Westmark (fredrik.westmark@gmail.com)",

@@ -30,8 +30,10 @@ import React from 'react';

// eslint-disable-next-line
route: ( { render: renderFn } = {} ) => {
route: ( { render: renderFn, component: overrideComponent } = {} ) => {
let child = null;
const useComponent = overrideComponent || component;
if ( renderFn || render ) {
child = ( <Route key={ fullPath } path={ fullPath } render={ renderFn || render } exact={ exact } /> );
} else if ( component ) {
child = ( <Route key={ fullPath } path={ fullPath } component={ component } exact={ exact } /> );
} else if ( useComponent ) {
child = ( <Route key={ fullPath } path={ fullPath } component={ useComponent } exact={ exact } /> );
} else {

@@ -38,0 +40,0 @@ child = (

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