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

signal-effect

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

signal-effect

Simple effect() method based on the tc39/proposal-signals

  • 0.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
0
Weekly downloads
 
Created
Source

signal-effect)

Signal Effect

Simple effect(() => {}) method based on the tc39/proposal-signals

Disclaimer: It uses "signal-polyfill" until the proposal is accepted and implemented in the browsers.

Install

npm install --save signal-effect signal-polyfill

Usage

// polyfill for signal
import { Signal } from 'signal-polyfill';

import { effect } from 'signal-effect';

const counter = new Signal.State(0);

effect(() => (element.innerText = counter.get()));

// Simulate external updates to counter...
setInterval(() => counter.set(counter.get() + 1), 1000);

Keywords

FAQs

Package last updated on 12 Sep 2024

Did you know?

Socket

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.

Install

Related posts

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