New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

router-dom

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

router-dom - npm Package Compare versions

Comparing version 2.2.2 to 2.2.3

1

dist/router.d.ts

@@ -42,2 +42,3 @@ export default class Router {

formHandler?(res: Response, e: Event): Promise<any> | void;
scrollBehavior?: ScrollBehavior;
}

@@ -44,0 +45,0 @@ interface RoutingProps {

10

dist/router.js

@@ -155,2 +155,3 @@ import { pathToRegexp, match } from "path-to-regexp";

finally {
dispatchEvent(new Event("afterRouting"));
// Reload -> restore scroll position

@@ -160,3 +161,3 @@ if (!this.oldRoute &&

sessionStorage.getItem(storageKey)) {
const [x, y] = sessionStorage
const [left, top] = sessionStorage
.getItem(storageKey)

@@ -166,5 +167,8 @@ .split(" ")

sessionStorage.removeItem(storageKey);
scroll(x, y);
scrollTo({
top,
left,
behavior: this.options.scrollBehavior || "auto",
});
}
dispatchEvent(new Event("afterRouting"));
}

@@ -171,0 +175,0 @@ }

{
"name": "router-dom",
"version": "2.2.2",
"version": "2.2.3",
"description": "A lightweight router for everyone",

@@ -5,0 +5,0 @@ "type": "module",

@@ -60,3 +60,3 @@ # router-dom

You can also specifiy one-level of children.<br> One more interesting property is the `restoreScrollOnReload`.
The second argument is the optional object options: it can take a general errorHandler and a formHandler. If there is a formHandler, form submits will handled via attributes on the form element and fetch.
The second argument is the optional object options: it can take a general errorHandler, a formHandler and the scrollBehavior. If there is a formHandler, form submits will handled via attributes on the form element and fetch.

@@ -63,0 +63,0 @@ ```js

@@ -181,2 +181,4 @@ import type { MatchResult } from "path-to-regexp";

} finally {
dispatchEvent(new Event("afterRouting"));
// Reload -> restore scroll position

@@ -188,3 +190,3 @@ if (

) {
const [x, y] = sessionStorage
const [left, top] = sessionStorage
.getItem(storageKey)!

@@ -194,6 +196,8 @@ .split(" ")

sessionStorage.removeItem(storageKey);
scroll(x, y);
scrollTo({
top,
left,
behavior: this.options.scrollBehavior || "auto",
});
}
dispatchEvent(new Event("afterRouting"));
}

@@ -370,2 +374,3 @@ }

formHandler?(res: Response, e: Event): Promise<any> | void;
scrollBehavior?: ScrollBehavior;
}

@@ -372,0 +377,0 @@ interface RoutingProps {

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