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

@superdispatch/hooks

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@superdispatch/hooks - npm Package Compare versions

Comparing version 0.7.21 to 0.7.23

20

dist-node/index.js

@@ -60,12 +60,2 @@ 'use strict';

function useValueObserver(value, observer) {
var ref = react.useRef(value);
react.useEffect(() => {
if (!Object.is(value, ref.current)) {
observer(ref.current);
ref.current = value;
}
});
}
function useEventHandler(handler) {

@@ -111,2 +101,12 @@ var mountRef = react.useRef(false);

function useValueObserver(value, observer) {
var ref = react.useRef(value);
react.useEffect(() => {
if (!Object.is(value, ref.current)) {
observer(ref.current);
ref.current = value;
}
});
}
exports.useConstant = useConstant;

@@ -113,0 +113,0 @@ exports.useDeepEqualMemo = useDeepEqualMemo;

export * from "./constant/useConstant.js";
export * from "./deep-equal-memo/useDeepEqualMemo.js";
export * from "./deep-equal-value/useDeepEqualValue.js";
export * from "./value-observer/useValueObserver.js";
export * from "./event-handler/useEventHandler.js";
export * from "./is-mounted/useIsMounted.js";
export * from "./is-mounted/useIsMounted.js";
export * from "./value-observer/useValueObserver.js";

@@ -9,4 +9,2 @@ import { DependencyList } from 'react';

declare function useValueObserver<T>(value: T, observer: (prev: T) => void): void;
declare type EventHandler<T> = (event: T) => void;

@@ -17,2 +15,4 @@ declare function useEventHandler<T>(handler: null | undefined | EventHandler<T>): EventHandler<T>;

declare function useValueObserver<T>(value: T, observer: (prev: T) => void): void;
export { EventHandler, useConstant, useDeepEqualMemo, useDeepEqualValue, useEventHandler, useIsMounted, useValueObserver };

@@ -56,12 +56,2 @@ import { useRef, useEffect, useLayoutEffect, useCallback } from 'react';

function useValueObserver(value, observer) {
var ref = useRef(value);
useEffect(() => {
if (!Object.is(value, ref.current)) {
observer(ref.current);
ref.current = value;
}
});
}
function useEventHandler(handler) {

@@ -106,3 +96,13 @@ var mountRef = useRef(false);

function useValueObserver(value, observer) {
var ref = useRef(value);
useEffect(() => {
if (!Object.is(value, ref.current)) {
observer(ref.current);
ref.current = value;
}
});
}
export { useConstant, useDeepEqualMemo, useDeepEqualValue, useEventHandler, useIsMounted, useValueObserver };
//# sourceMappingURL=index.js.map
{
"name": "@superdispatch/hooks",
"version": "0.7.21",
"version": "0.7.23",
"license": "MIT",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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