Skip to content

Releases: Dattaya/use-progressive-image

2.0.1

08 Feb 08:28
Compare
Choose a tag to compare
  • ssr arg should be optional

v2.0.0

07 Feb 16:31
Compare
Choose a tag to compare

Breaking changes

  • Changed signature to match React's camel case style, all arguments are also grouped into one, img can accept a string (src):
function useProgressiveImage(args: {
  img?: string | { sizes?: string; src?: string; srcSet?: string; };
  sources?: { sizes?: string; src?: string; srcSet?: string; type?: string; }[];
  ssr?: boolean; // set to true if it's an SSR app
  // returns `loading` and an `Error` event if failed to load
}): [boolean, Event | string | undefined] 

Improvements

  • SSR mode is now more reliable.

1.0.2

31 Jan 19:01
Compare
Choose a tag to compare
  • [bug] Fixed inconsistency between the client and server for images that have not been loaded during js parsing and react initializing, now it will match the server's return value which is false.

Update dependencies

17 Jan 11:50
Compare
Choose a tag to compare
v1.0.1

chore: new verion