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

@nanostores/preact

Package Overview
Dependencies
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nanostores/preact - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

12

index.js

@@ -17,7 +17,7 @@ import { useState, useEffect } from 'preact/hooks'

useEffect(() => {
let batching
let batching, timer, unlisten
let rerender = () => {
if (!batching) {
batching = 1
setTimeout(() => {
timer = setTimeout(() => {
batching = undefined

@@ -29,6 +29,10 @@ forceRender({})

if (opts.keys) {
return listenKeys(store, opts.keys, rerender)
unlisten = listenKeys(store, opts.keys, rerender)
} else {
return store.listen(rerender)
unlisten = store.listen(rerender)
}
return () => {
unlisten()
clearTimeout(timer)
}
}, [store, '' + opts.keys])

@@ -35,0 +39,0 @@

{
"name": "@nanostores/preact",
"version": "0.1.2",
"version": "0.1.3",
"description": "Preact integration for Nano Stores, a tiny state manager with many atomic tree-shakable stores",

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

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