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

@nextui-org/use-image

Package Overview
Dependencies
Maintainers
1
Versions
240
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nextui-org/use-image - npm Package Compare versions

Comparing version 0.0.0-canary-20250102192808 to 0.0.0-canary-20250103142904

10

dist/index.js

@@ -29,2 +29,3 @@ "use strict";

var import_react_utils = require("@nextui-org/react-utils");
var import_use_safe_layout_effect = require("@nextui-org/use-safe-layout-effect");
function useImage(props = {}) {

@@ -34,5 +35,3 @@ const { onLoad, onError, ignoreFallback } = props;

const imageRef = (0, import_react.useRef)(isHydrated ? new Image() : null);
const [status, setStatus] = (0, import_react.useState)(
() => isHydrated ? setImageAndGetInitialStatus(props, imageRef) : "pending"
);
const [status, setStatus] = (0, import_react.useState)("pending");
(0, import_react.useEffect)(() => {

@@ -59,2 +58,7 @@ if (!imageRef.current)

};
(0, import_use_safe_layout_effect.useSafeLayoutEffect)(() => {
if (isHydrated) {
setStatus(setImageAndGetInitialStatus(props, imageRef));
}
}, [isHydrated]);
return ignoreFallback ? "loaded" : status;

@@ -61,0 +65,0 @@ }

{
"name": "@nextui-org/use-image",
"version": "0.0.0-canary-20250102192808",
"version": "0.0.0-canary-20250103142904",
"description": "React hook for progressing image loading",

@@ -29,3 +29,3 @@ "keywords": [

"@nextui-org/use-safe-layout-effect": "2.1.1",
"@nextui-org/react-utils": "0.0.0-canary-20250102192808"
"@nextui-org/react-utils": "0.0.0-canary-20250103142904"
},

@@ -32,0 +32,0 @@ "peerDependencies": {

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