Description
While working on my markdown module, I ran into a situation where my simulator CPU would jump to 160%+ and would (obviously) freeze the app. I found this behaviour particularly strange because the only thing I was doing was inserting React elements into the virtual DOM.
I thought perhaps there was a parsing bug that was causing a huge tree to be rendered, but upon further investigation I found I could repeat the issue with plain text inside my Markdown tag. The issue was only coming up after a certain number of letters were entered. That initial assumption was wrong though.
What seems to be happening is when a Text
element exceeds the available width of its containing View
, a bug causes the app to freeze up. This is more difficult to explain than it is to show, here's the code: (For reference, I was using 0.3.11
the iPhone 6 simulator, so the 375 width is relevant.)
<View style={{padding: 15, width: 375}}>
<View style={{
marginTop: 10,
marginBottom: 10,
flexWrap: 'wrap',
flexDirection: 'row',
alignItems: 'flex-start',
justifyContent: 'flex-start'
}}>
<Text>
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</Text>
</View>
</View>