Skip to content

Releases: Dattaya/use-progressive-image

2.0.1

Choose a tag to compare

@Dattaya Dattaya released this 08 Feb 08:28
  • ssr arg should be optional

v2.0.0

Choose a tag to compare

@Dattaya Dattaya released this 07 Feb 16:31

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

Choose a tag to compare

@Dattaya Dattaya released this 31 Jan 19:01
  • [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

Choose a tag to compare

@Dattaya Dattaya released this 17 Jan 11:50
v1.0.1

chore: new verion