From 65a8e87456ad82c33b80b2bfc5bddfb28578bdf4 Mon Sep 17 00:00:00 2001 From: Yaroslav Kiliba Date: Mon, 8 Feb 2021 10:22:31 +0200 Subject: [PATCH] chore: improve readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bbc2a2d..3e0f2a0 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Hook for progressive image loading, alternative to [react-progressive-image](htt - Supports `` and `` with `` 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