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

use-react-router

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-react-router - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

18

package.json
{
"name": "use-react-router",
"version": "1.0.3",
"version": "1.0.4",
"author": "Charles Stover <npmjs@charlesstover.com>",
"bugs": {
"url": "https://github.com/CharlesStover/use-react-router/issues"
},
"description": "React Hook for pub-sub behavior using React Router.",

@@ -13,2 +10,9 @@ "homepage": "https://github.com/CharlesStover/use-react-router#readme",

"repository": "https://github.com/CharlesStover/use-react-router.git",
"bugs": {
"url": "https://github.com/CharlesStover/use-react-router/issues"
},
"files": [
"use-react-router.d.ts",
"use-react-router.js"
],
"scripts": {

@@ -18,2 +22,5 @@ "build": "tsc",

},
"dependencies": {
"use-force-update": "^1.0.4"
},
"devDependencies": {

@@ -29,6 +36,3 @@ "@types/react": "^16.4.18",

"react-router": "^4.4.0"
},
"dependencies": {
"use-force-update": "^1.0.0"
}
}

@@ -1,2 +0,3 @@

# use-react-router
# useReactRouter [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Want%20to%20use%20react-router%20with%20Hooks?%20Now%20you%20can%20with%20use-react-router!&url=https://github.com/CharlesStover/use-react-router&via=CharlesStover&hashtags=react,reactjs,javascript,typescript,webdev,webdeveloper,webdevelopment)
`useReactRouter` is a React Hook that provides pub-sub behavior for `react-router`.

@@ -7,2 +8,10 @@ Unlike the `withRouter` Higher-Order Component, `useReactRouter` will re-render your component when the location changes!

A tutorial covering the design and development of this package can be found on Medium: [How to Convert withRouter to a React Hook](https://medium.com/@Charles_Stover/how-to-convert-withrouter-to-a-react-hook-19bb02a29ed6).
[![version](https://img.shields.io/npm/v/use-react-router.svg)](https://www.npmjs.com/package/use-react-router)
[![minified size](https://img.shields.io/bundlephobia/min/use-react-router.svg)](https://www.npmjs.com/package/use-react-router)
[![minzipped size](https://img.shields.io/bundlephobia/minzip/use-react-router.svg)](https://www.npmjs.com/package/use-react-router)
[![downloads](https://img.shields.io/npm/dt/use-react-router.svg)](https://www.npmjs.com/package/use-react-router)
[![build](https://api.travis-ci.com/CharlesStover/use-react-router.svg)](https://travis-ci.com/CharlesStover/use-react-router/)
## Why Pub-Sub?

@@ -17,4 +26,5 @@

## Install
You must be using `react-router` v4.4.0 or greater. At time of publication, you must install `react-router@next` in order to grab the 4.4.0 package.
**You must be using `react-router` and `react-router-dom` v4.4.0 or greater.** At time of publication, you must install `react-router@next` and `react-router-dom@next` in order to grab the 4.4.0 package.
* `npm install use-react-router` or

@@ -24,2 +34,3 @@ * `yarn add use-react-router`

## Use
Import `useReactRouter` and use it as a React Hook.

@@ -26,0 +37,0 @@

@@ -18,2 +18,1 @@ "use strict";

exports.default = useRouter;
//# sourceMappingURL=use-react-router.js.map
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