Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@nanostores/lit
Advanced tools
Lit integration for Nano Stores, a tiny state manager with many atomic tree-shakable stores
Lit integration for Nano Stores, a tiny state manager with many atomic tree-shakable stores.
Install it:
npm add nanostores @nanostores/lit # or yarn
Use it as a decorator with @useStores
:
import { LitElement, html } from "lit";
import { customElement } from "lit/decorators.js";
import { useStores } from "@nanostores/lit";
import { profile } from "./stores/profile.js";
@customElement("my-header")
@useStores(profile)
class MyHeader extends LitElement {
render() {
return html`<header>${profile.get().userId}</header>`;
}
}
Or as a mixin with withStores
:
import { LitElement, html } from "lit";
import { customElement } from "lit/decorators.js";
import { withStores } from "@nanostores/lit";
import { profile } from "./stores/profile.js";
@customElement("my-header")
class MyHeader extends withStores(LitElement, [profile]) {
render() {
return html`<header>${profile.get().userId}</header>`;
}
}
Or as a Reactive Controller with StoreController
:
import { LitElement, html } from "lit";
import { customElement } from "lit/decorators.js";
import { StoreController } from "@nanostores/lit";
import { profile } from "./stores/profile.js";
@customElement("my-header")
class MyHeader extends LitElement {
private profileController = new StoreController(this, profile);
render() {
return html`<header>${this.profileController.value.userId}</header>`;
}
}
FAQs
Lit integration for Nano Stores, a tiny state manager with many atomic tree-shakable stores
The npm package @nanostores/lit receives a total of 160 weekly downloads. As such, @nanostores/lit popularity was classified as not popular.
We found that @nanostores/lit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.