Open designbyadrian opened 7 years ago
This sounds bad for SEO when doing server-side rendering. And of course, you definitely can't measure the text up front on the server.
If it’s done via CSS, there isn’t any impact on SEO or SSR
"If it’s done via CSS, there isn’t any impact on SEO or SSR" - that's not true, major search engines can tell if text is hidden via CSS.
You’re right and i was wrong. Regardless, It’s up to me if I want to sacrifice SEO. Now there is no event that tells me when the module is ready, so i can change class of the text blocks.
@designbyadrian were you able to resolve the issue of element starting off as fully rendered? I too am struggling with this, its not a good user experience if element shrinks abruptly after page load.
UPDATE Realized its an issue with the underlying library react-truncate
as well https://github.com/One-com/react-truncate/issues/84
Currently, the element starts off fully rendered, then reduces its height if there's more content.
A quick solution would be to hide the entire text on first render.