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

micro-observables

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

micro-observables - npm Package Compare versions

Comparing version 1.2.4 to 1.2.5

6

lib/hooks.js

@@ -13,7 +13,7 @@ "use strict";

function useObservable(observable) {
var _a = react_1.useState(observable.get()), val = _a[0], setVal = _a[1];
var _a = react_1.useState(), forceUpdate = _a[1];
react_1.useEffect(function () {
return observable.onChange(function (newVal) { return setVal(newVal); });
return observable.onChange(forceUpdate);
}, [observable]);
return val;
return observable.get();
}

@@ -20,0 +20,0 @@ exports.useObservable = useObservable;

{
"name": "micro-observables",
"version": "1.2.4",
"version": "1.2.5",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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