Tracks whether the image inside a wrapper is loading, loaded or failed, whatever component drew it, so a card or a gallery can swap a broken image for a fallback.
pnpm add @behivetech/hooks.use-image-status
Published to npm.pkg.github.com
v0.1.1 · current
v0.1.0
Changelog
v0.1.1
Patch Changes
8fe9fb4: Declare "sideEffects": ["**/*.css"] so a bundler can drop the package when its exports are unused. Packages that build class names depend on @behivetech/get-class-name (a real dependency, kept external) instead of bundling their own copy of the helper, so an app loads it once.
v0.1.0
Minor Changes
48c9e6b: New hook package: useImageStatus tracks whether the image inside a wrapper is loading, loaded or failed, and keeps the failed image's alt text. It replaces the copies in molecules.image-card and organisms.gallery.