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

@radix-ui/react-use-callback-ref

Package Overview
Dependencies
Maintainers
5
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@radix-ui/react-use-callback-ref - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

dist/index.js

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

var e,r,n=(e={},r=require("react"),Object.keys(r).forEach((function(n){"default"!==n&&"__esModule"!==n&&Object.defineProperty(e,n,{enumerable:!0,get:function(){return r[n]}})})),e);exports.useCallbackRef=function(e){var r=n.useRef(e);return n.useEffect((function(){r.current=e})),n.useCallback((function(){for(var e,n=arguments.length,t=new Array(n),u=0;u<n;u++)t[u]=arguments[u];return null===(e=r.current)||void 0===e?void 0:e.call.apply(e,[r].concat(t))}),[])};
var e,r,n,t,u=require("react"),a=u.useRef,c=u.useEffect,l=u.useCallback,o=(e=require("@babel/runtime-corejs3/core-js-stable/instance/concat"))&&e.__esModule?e.default:e;function f(e){var r=a(e);return c((function(){r.current=e})),l((function(){for(var e,n,t=arguments.length,u=new Array(t),a=0;a<t;a++)u[a]=arguments[a];return null===(e=r.current)||void 0===e?void 0:e.call.apply(e,o(n=[r]).call(n,u))}),[])}exports.useCallbackRef=f,r={},n="useCallbackRef",t=function(){return f},Object.defineProperty(r,n,{get:t,enumerable:!0});
//# sourceMappingURL=index.js.map

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

import*as e from"react";export function useCallbackRef(r){const t=e.useRef(r);return e.useEffect((()=>{t.current=r})),e.useCallback(((...e)=>{var r;return null===(r=t.current)||void 0===r?void 0:r.call(t,...e)}),[])}
import{useRef as r,useEffect as e,useCallback as n}from"react";import t from"@babel/runtime-corejs3/core-js-stable/instance/concat";var c,o,a;function l(c){var o=r(c);return e((function(){o.current=c})),n((function(){for(var r,e,n=arguments.length,c=new Array(n),a=0;a<n;a++)c[a]=arguments[a];return null===(r=o.current)||void 0===r?void 0:r.call.apply(r,t(e=[o]).call(e,c))}),[])}export{l as useCallbackRef};c={},o="useCallbackRef",a=function(){return l},Object.defineProperty(c,o,{get:a,enumerable:!0});
//# sourceMappingURL=index.module.js.map
{
"name": "@radix-ui/react-use-callback-ref",
"version": "0.0.1",
"version": "0.0.2",
"license": "MIT",

@@ -16,3 +16,4 @@ "source": "src/index.ts",

"clean": "rm -rf dist",
"prepublish": "yarn clean"
"prepublish": "yarn clean",
"version": "yarn version"
},

@@ -29,3 +30,6 @@ "peerDependencies": {

"url": "https://github.com/radix-ui/primitives/issues"
},
"dependencies": {
"@babel/runtime-corejs3": "^7.13.10"
}
}

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