5 ms·
Yea there's plenty of benefits using a truncation library (we're currently using react-lines-ellipsis) over just css truncation. More control over how the trunc
by comis 7y ago
Yea there's plenty of benefits using a truncation library (we're currently using react-lines-ellipsis) over just css truncation. More control over how the truncation happens, callback so you can do more stuff on the condition that truncation has occurred, multi-line truncation as you mentioned, etc etc.
I get the feeling that most of the time when people are complaining about unnecessary libraries they simply haven't personally run into the problem that the library solves yet.
- draw_down 7y ago> I get the feeling that most of the time when people are complaining about unnecessary libraries they simply haven't personally run into the problem that the library solves yet. Ding ding ding. "CSS does that!" is such an easy meme to replicate. Let's all try to consider that web developers are not just insane freaks who love to put JavaScript where it doesn't belong, and instead just regular people trying to solve problems like anyone else.