react-clamp-lines
react-clamp-lines copied to clipboard
Dynamic text and strings without spaces in between words doesn't work
When using react clamp lines with dynamic text or long strings without spaces, I noticed that the clamping functionality does not work properly. This calculation specifically: https://github.com/zoltantothcom/react-clamp-lines/blob/master/src/index.js#L105 does not cover scenarios when the text changes after initial render