You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compared to View, <Text /> has extremely limited styling capabilities. These all have issues / don't work at all:
borderRadius
padding
height: 100%
width: 100%
flexGrow
flexBasis
justifyContent
alignItems
The list goes on. I wonder if this is a fundamental limitation of NativeTextComponent or if it could be fixed by forwarding more styles.
I have spent a lot of time trying to port web code/libraries to native, and this is a massive headache, mainly because all HTML elements let you render text without any limitations.
For example, every <span> I turn into <Text> results in totally incorrect styles.
I'd be happy to turn this into an umbrella issue and/or assist with PRs if there is some guidance on the best approach to take.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Description
Compared to
View
,<Text />
has extremely limited styling capabilities. These all have issues / don't work at all:borderRadius
padding
height: 100%
width: 100%
flexGrow
flexBasis
justifyContent
alignItems
The list goes on. I wonder if this is a fundamental limitation of
NativeTextComponent
or if it could be fixed by forwarding more styles.I have spent a lot of time trying to port web code/libraries to native, and this is a massive headache, mainly because all HTML elements let you render text without any limitations.
For example, every
<span>
I turn into<Text>
results in totally incorrect styles.I'd be happy to turn this into an umbrella issue and/or assist with PRs if there is some guidance on the best approach to take.
Related from
react-strict-dom
: facebook/react-strict-dom#278Thanks!
Beta Was this translation helpful? Give feedback.
All reactions