Releases: Dattaya/use-progressive-image
Releases · Dattaya/use-progressive-image
2.0.1
v2.0.0
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
Update dependencies
v1.0.1 chore: new verion