Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@tamagui/use-previous

Package Overview
Dependencies
Maintainers
2
Versions
1043
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tamagui/use-previous - npm Package Compare versions

Comparing version
1.89.0-1706483140977
to
1.89.0
+5
-26
dist/esm/index.native.js

@@ -1,30 +0,9 @@

"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: !0 });
}, __copyProps = (to, from, except, desc) => {
if (from && typeof from == "object" || typeof from == "function")
for (let key of __getOwnPropNames(from))
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var src_exports = {};
__export(src_exports, {
usePrevious: () => usePrevious
});
module.exports = __toCommonJS(src_exports);
var import_react = require("react");
import { useMemo, useRef } from "react";
function usePrevious(value) {
const ref = (0, import_react.useRef)({ value, previous: value });
return (0, import_react.useMemo)(() => (ref.current.value !== value && (ref.current.previous = ref.current.value, ref.current.value = value), ref.current.previous), [value]);
const ref = useRef({ value, previous: value });
return useMemo(() => (ref.current.value !== value && (ref.current.previous = ref.current.value, ref.current.value = value), ref.current.previous), [value]);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
export {
usePrevious
});
};
//# sourceMappingURL=index.js.map
+1
-1
{
"version": 3,
"sources": ["../../src/index.ts"],
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAAgC;AAEzB,SAAS,YAAe,OAAU;AACvC,QAAM,UAAM,qBAAO,EAAE,OAAO,UAAU,MAAM,CAAC;AAK7C,aAAO,sBAAQ,OACT,IAAI,QAAQ,UAAU,UACxB,IAAI,QAAQ,WAAW,IAAI,QAAQ,OACnC,IAAI,QAAQ,QAAQ,QAEf,IAAI,QAAQ,WAClB,CAAC,KAAK,CAAC;AACZ;",
"mappings": "AAEA,SAAS,SAAS,cAAc;AAEzB,SAAS,YAAe,OAAU;AACvC,QAAM,MAAM,OAAO,EAAE,OAAO,UAAU,MAAM,CAAC;AAK7C,SAAO,QAAQ,OACT,IAAI,QAAQ,UAAU,UACxB,IAAI,QAAQ,WAAW,IAAI,QAAQ,OACnC,IAAI,QAAQ,QAAQ,QAEf,IAAI,QAAQ,WAClB,CAAC,KAAK,CAAC;AACZ;",
"names": []
}
{
"name": "@tamagui/use-previous",
"version": "1.89.0-1706483140977",
"version": "1.89.0",
"types": "./types/index.d.ts",

@@ -21,3 +21,3 @@ "main": "dist/cjs",

"devDependencies": {
"@tamagui/build": "1.89.0-1706483140977"
"@tamagui/build": "1.89.0"
},

@@ -24,0 +24,0 @@ "exports": {