alignItems: 'baseline' crashes app
See original GitHub issueBefore filling out an issue, be sure to check the version of react-native-elements you are using and the docs for that version over here.
Explain what you did
Aligning Icons to text in a flexDirection: 'row' with alignItems: 'baseline'
Expected behaviour That the icons remain aligned to the baseline together with the text.
Describe the bug
Whenever alignItems: 'baseline' is applied as style to the parent view containing Icons. The app crashes.
To Reproduce
Reproduced in snack. No need to go nowhere app crashes as soon as opened. To check difference change alignItems: 'baseline' → alignItems: 'center'
Possible Solution No idea how this even happens.
Your Environment (please complete the following information):
| software | version |
|---|---|
| react-native-elements | 1.2.6 |
| react-native | 0.61.2 |
| yarn | 1.19.1 |
| npm | 6.9.0 |
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
Expo crash once put <Text> inside <View> without error
... once i open that screen the app will crash without error. then i ... remove alignItems: "baseline", from the main view...and its...
Read more >React native app crash for no reason : r/reactnative - Reddit
when ever I add this line of code in my react native app it crash. when I go to the screen the code...
Read more >How to simulate "align-items: baseline" in React Native?
Currently React Native supports every Flexbox property except baseline. To get around with this issue, you can set the height to be the...
Read more >Align Items & Justify Content in React Native - YouTube
Align items is very similar to justifyContent but instead of ... cross axis. baseline Align children of a container along a common baseline....
Read more >alignment-baseline - SVG: Scalable Vector Graphics | MDN
The alignment-baseline attribute specifies how an object is aligned with respect to its parent. This property specifies which baseline of ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I was able to work around this crash by adding
flex:1to the container that had thealignItems:baselinein it. Not sure what’s causing the crash, but hopefully this is a satisfactory answer for anyone running into this.I have the same issue, any solutions ?