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

@lwce/router

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lwce/router - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

src/wire-adapters/history.js

2

package.json
{
"name": "@lwce/router",
"version": "0.1.1",
"version": "0.2.0",
"description": "A LWC router that supports server-side rendering",

@@ -5,0 +5,0 @@ "keywords": [

# `@lwce/router`
A lightning web bomponent for building declarative routing within
A lightning web component for building declarative routing within
single-page applications.

@@ -97,1 +97,19 @@

```
### history
Use the `history` wire adapter to imperatively change routes.
Example:
```js
import { LightningElement, api, wire } from 'lwc';
import { history } from '@lwce/router';
export default class Link extends LightningElement {
@wire(history) history;
onClickHandler(e) {
this.history.push('/settings');
}
}
```

@@ -14,2 +14,6 @@ import {LightningElement, api} from 'lwc';

this.addEventListener(
'lwcerouter_addhistoryadapter',
this.addHistoryAdapter.bind(this),
);
this.addEventListener(
'lwcerouter_addrouteeventlistener',

@@ -72,2 +76,6 @@ this.addRoute.bind(this),

addHistoryAdapter(e) {
e.detail(this.history);
}
navigate(e) {

@@ -74,0 +82,0 @@ this.history.push(this.base + e.detail);

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