Socket
Socket
Sign inDemoInstall

@superdispatch/hooks

Package Overview
Dependencies
Maintainers
2
Versions
34
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.23 to 0.7.24

dist-src/isomorphic-layout-effect/useIsomorphicLayoutEffect.js

8

dist-node/index.js

@@ -49,6 +49,8 @@ 'use strict';

var useIsomorphicLayoutEffect = typeof document != 'undefined' ? react.useEffect : react.useLayoutEffect;
function useDeepEqualValue(value) {
var ref = react.useRef(value);
var isEqual = dequal.dequal(value, ref.current);
react.useLayoutEffect(() => {
useIsomorphicLayoutEffect(() => {
if (!isEqual) {

@@ -80,3 +82,3 @@ ref.current = value;

});
react.useLayoutEffect(() => {
useIsomorphicLayoutEffect(() => {
mountRef.current = true;

@@ -93,3 +95,3 @@ callbackRef.current = handler;

var ref = react.useRef(false);
react.useLayoutEffect(() => {
useIsomorphicLayoutEffect(() => {
ref.current = true;

@@ -96,0 +98,0 @@ return () => {

import { dequal } from 'dequal';
import { useLayoutEffect, useRef } from 'react';
import { useRef } from 'react';
import { useIsomorphicLayoutEffect } from "../isomorphic-layout-effect/useIsomorphicLayoutEffect.js";
export function useDeepEqualValue(value) {
var ref = useRef(value);
var isEqual = dequal(value, ref.current);
useLayoutEffect(() => {
useIsomorphicLayoutEffect(() => {
if (!isEqual) {

@@ -8,0 +9,0 @@ ref.current = value;

@@ -1,2 +0,3 @@

import { useLayoutEffect, useRef } from 'react';
import { useRef } from 'react';
import { useIsomorphicLayoutEffect } from "../isomorphic-layout-effect/useIsomorphicLayoutEffect.js";
export function useEventHandler(handler) {

@@ -20,3 +21,3 @@ var mountRef = useRef(false);

});
useLayoutEffect(() => {
useIsomorphicLayoutEffect(() => {
mountRef.current = true;

@@ -23,0 +24,0 @@ callbackRef.current = handler;

@@ -1,5 +0,6 @@

import { useCallback, useLayoutEffect, useRef } from 'react';
import { useCallback, useRef } from 'react';
import { useIsomorphicLayoutEffect } from "../isomorphic-layout-effect/useIsomorphicLayoutEffect.js";
export function useIsMounted() {
var ref = useRef(false);
useLayoutEffect(() => {
useIsomorphicLayoutEffect(() => {
ref.current = true;

@@ -6,0 +7,0 @@ return () => {

@@ -45,6 +45,8 @@ import { useRef, useEffect, useLayoutEffect, useCallback } from 'react';

var useIsomorphicLayoutEffect = typeof document != 'undefined' ? useEffect : useLayoutEffect;
function useDeepEqualValue(value) {
var ref = useRef(value);
var isEqual = dequal(value, ref.current);
useLayoutEffect(() => {
useIsomorphicLayoutEffect(() => {
if (!isEqual) {

@@ -75,3 +77,3 @@ ref.current = value;

});
useLayoutEffect(() => {
useIsomorphicLayoutEffect(() => {
mountRef.current = true;

@@ -88,3 +90,3 @@ callbackRef.current = handler;

var ref = useRef(false);
useLayoutEffect(() => {
useIsomorphicLayoutEffect(() => {
ref.current = true;

@@ -91,0 +93,0 @@ return () => {

{
"name": "@superdispatch/hooks",
"version": "0.7.23",
"version": "0.7.24",
"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