Skip to content

Commit

Permalink
chore: improve readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Dattaya committed Feb 8, 2021
1 parent b284490 commit 65a8e87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Hook for progressive image loading, alternative to [react-progressive-image](htt

- Supports `<img>` and `<picture>` with `<source>` elements.
- If image is in browser's cache, `loading` will be immediatelly `false` in Chrome, Firefox, and Edge.
- SSR: if it takes more time to load an image than to load, and parse js, and to initialize React, there might be a mismatch and loading would be `true` on the client when that happens. If you want to prevent that, set `ssr` to `true`. But this option might not work in development if you're using webpack, probably because webpack dev environment is a little bit magical.
- SSR: Returns `false` on the server, so the server returns image paths instead of placeholders because by the time js is loaded, parsed, and React initialized, most images would have already fully or at least partially loaded. If React is ready and an image is still loading, we have a mismatch and `loading` is going to be `true` on the client when that happens. If you want to prevent that, set `ssr` to `true`. But this option might not work in development if you're using webpack, probably because webpack dev environment is a little bit magical.
- Written in TypeScript.

## Install
Expand Down

0 comments on commit 65a8e87

Please sign in to comment.