Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between simple, highQuality, balanced for textBreakStrategy property in React Native?

What is the difference between simple, highQuality and balanced value for textBreakStrategy property of <Text> component in React Native? These values are not documented in the documentation of React Native.

like image 336
Stack Overflow Avatar asked Dec 14 '22 14:12

Stack Overflow


1 Answers

By default, for Text component Android use highQuality and that is causing the words breaking using hyphens.

If you want to avoid that, you can set the break strategy to simple.

This is the difference among all of textBreakStrategys.

balanced - Line breaking strategy balances line lengths.

high_quality - Line breaking uses high-quality strategy, including hyphenation.

simple - Line breaking uses simple strategy.

enter image description here

like image 192
Sateesh Yemireddi Avatar answered Jan 25 '23 22:01

Sateesh Yemireddi