use-react-router
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "use-react-router", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"author": "Charles Stover <npmjs@charlesstover.com>", | ||
@@ -5,0 +5,0 @@ "bugs": { |
@@ -0,0 +0,0 @@ # use-react-router |
@@ -0,0 +0,0 @@ import { RouteComponentProps } from 'react-router'; |
@@ -9,2 +9,5 @@ "use strict"; | ||
var routerContext = react_1.useContext(react_router_1.__RouterContext); | ||
if (!routerContext) { | ||
throw new Error('use-react-router may only be used within a react-router context.'); | ||
} | ||
react_1.useEffect(function () { | ||
@@ -11,0 +14,0 @@ return routerContext.history.listen(forceUpdate); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
23
12320