A bit improved Jeffy Lee code worked for me
const AdjustLabel = ({
fontSize, text, style, numberOfLines
}) => {
const [currentFont, setCurrentFont] = useState(fontSize);
return (
<Text
numberOfLines={ numberOfLines }
adjustsFontSizeToFit
style={ [style, { fontSize: currentFont }] }
onTextLayout={ (e) => {
const { lines } = e.nativeEvent;
if (lines.length > numberOfLines) {
setCurrentFont(currentFont - 1);
}
} }
>
{ text }
</Text>
);
};