David Dal Busco
1 min readSep 4, 2019

--

Good question, actually I never tried ;)

Stencil’s components themselves are SSR friendly, so I don’t see any problem there.

Then what I don’t know if images (tags) are evaluated when rendered on the server side or not. If yes, then it might need to use conditional rendering to avoid error (thx Stencil’s “Build.isBrowser”) and/or use fix width / height for the images?

Deserves a try at some point

P.S.: Not related, since that article I’ve improved the component as now Chrome supports native lazy loading. Per default this method is the first of choice, if not there, then fallback on observer and if not supported, then fallback on “normal” image

--

--

David Dal Busco
David Dal Busco

Written by David Dal Busco

Freelancer by day | Creator of Juno.build by night

No responses yet