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

use-latest-callback

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-latest-callback - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

lib/useIsomorphicLayoutEffect.d.ts

7

lib/index.js

@@ -21,5 +21,8 @@ "use strict";

};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var React = __importStar(require("react"));
var useIsomorphicLayoutEffect = typeof document !== 'undefined' ? React.useLayoutEffect : React.useEffect;
var useIsomorphicLayoutEffect_1 = __importDefault(require("./useIsomorphicLayoutEffect"));
/**

@@ -38,3 +41,3 @@ * React hook which returns the latest callback without changing the reference.

}).current;
useIsomorphicLayoutEffect(function () {
useIsomorphicLayoutEffect_1.default(function () {
ref.current = callback;

@@ -41,0 +44,0 @@ });

{
"name": "use-latest-callback",
"version": "0.1.6",
"version": "0.1.7",
"description": "React hook which returns the latest callback without changing the reference",

@@ -5,0 +5,0 @@ "source": "src/index.ts",

import * as React from 'react';
import useIsomorphicLayoutEffect from './useIsomorphicLayoutEffect';
const useIsomorphicLayoutEffect =
typeof document !== 'undefined' ? React.useLayoutEffect : React.useEffect;
/**

@@ -7,0 +5,0 @@ * React hook which returns the latest callback without changing the reference.

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