Socket
Socket
Sign inDemoInstall

react-router

Package Overview
Dependencies
Maintainers
2
Versions
516
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-router - npm Package Compare versions

Comparing version 5.1.2 to 6.0.0-alpha.0

node-main.js

63

package.json
{
"name": "react-router",
"version": "5.1.2",
"version": "6.0.0-alpha.0",
"description": "Declarative routing for React",
"author": "React Training <hello@reacttraining.com>",
"repository": "ReactTraining/react-router",
"license": "MIT",
"authors": [
"Michael Jackson",
"Ryan Florence"
],
"files": [
"MemoryRouter.js",
"Prompt.js",
"Redirect.js",
"Route.js",
"Router.js",
"StaticRouter.js",
"Switch.js",
"cjs",
"es",
"esm",
"index.js",
"generatePath.js",
"matchPath.js",
"modules/*.js",
"modules/utils/*.js",
"withRouter.js",
"warnAboutDeprecatedCJSRequire.js",
"umd"
],
"main": "index.js",
"module": "esm/react-router.js",
"sideEffects": false,
"scripts": {
"build": "rollup -c",
"lint": "eslint modules",
"test": "jest"
"main": "node-main.js",
"module": "react-router.js",
"unpkg": "umd/react-router.production.min.js",
"dependencies": {
"prop-types": "^15.7.2"
},
"peerDependencies": {
"react": ">=15"
"history": "5.0.0-beta.3",
"react": ">=16.8"
},
"dependencies": {
"@babel/runtime": "^7.1.2",
"history": "^4.9.0",
"hoist-non-react-statics": "^3.1.0",
"loose-envify": "^1.3.1",
"mini-create-react-context": "^0.3.0",
"path-to-regexp": "^1.7.0",
"prop-types": "^15.6.2",
"react-is": "^16.6.0",
"tiny-invariant": "^1.0.2",
"tiny-warning": "^1.0.0"
},
"browserify": {
"transform": [
"loose-envify"
]
},
"sideEffects": false,
"keywords": [

@@ -66,4 +26,3 @@ "react",

"link"
],
"gitHead": "f31bb27aa61dd4cb1c3cd9aa78133f739e2e9bb9"
]
}

@@ -1,39 +0,16 @@

# react-router
# React Router
Declarative routing for [React](https://facebook.github.io/react).
The `react-router` package is the heart of [React Router](/) and provides all
the core functionality for both
[`react-router-dom`](https://github.com/ReactTraining/react-router/packages/react-router-dom)
and
[`react-router-native`](https://github.com/ReactTraining/react-router/packages/react-router-native).
## Installation
If you're using React Router, you should never `import` anything directly from
the `react-router` package, but you should have everything you need in either
`react-router-dom` or `react-router-native`. Both of those packages re-export
everything from `react-router`.
Using [npm](https://www.npmjs.com/):
$ npm install --save react-router
**Note:** This package provides the core routing functionality for React Router, but you might not want to install it directly. If you are writing an application that will run in the browser, you should instead install `react-router-dom`. Similarly, if you are writing a React Native application, you should instead install `react-router-native`. Both of those will install `react-router` as a dependency.
Then with a module bundler like [webpack](https://webpack.github.io/), use as you would anything else:
```js
// using ES6 modules
import { Router, Route, Switch } from "react-router";
// using CommonJS modules
var Router = require("react-router").Router;
var Route = require("react-router").Route;
var Switch = require("react-router").Switch;
```
The UMD build is also available on [unpkg](https://unpkg.com):
```html
<script src="https://unpkg.com/react-router/umd/react-router.min.js"></script>
```
You can find the library on `window.ReactRouter`.
## Issues
If you find a bug, please file an issue on [our issue tracker on GitHub](https://github.com/ReactTraining/react-router/issues).
## Credits
React Router is built and maintained by [React Training](https://reacttraining.com).
If you'd like to extend React Router and you know what you're doing, you should
add `react-router` **as a peer dependency, not a regular dependency** in your
package.

Sorry, the diff of this file is not supported yet

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