Skip to content

v2.0.0

Compare
Choose a tag to compare
@Dattaya Dattaya released this 07 Feb 16:31
· 313 commits to main since this release

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.