Skip to content

Commit

Permalink
remove code relating to Nesting of <View> within <Text>, which result… (
Browse files Browse the repository at this point in the history
#20558)

Summary:
…s a crash in Text Example of RNTester.

Thank you for sending the PR! We appreciate you spending the time to work on these changes.
Help us understand your motivation by explaining why you decided to make this change.

If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
Pull Request resolved: #20558

Differential Revision: D9235009

Pulled By: hramos

fbshipit-source-id: 23ed28f7c8b84f509d35ac0fe7aa72c183a9ab11
  • Loading branch information
rainywan authored and facebook-github-bot committed Aug 9, 2018
1 parent 457a74c commit 0366349
Showing 1 changed file with 0 additions and 64 deletions.
64 changes: 0 additions & 64 deletions RNTester/js/TextExample.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,25 +255,6 @@ class TextBaseLineLayoutExample extends React.Component<*, *> {
{marker}
</View>

<Text style={subtitleStyle}>{'Interleaving <View> and <Text>:'}</Text>
<View style={{flexDirection: 'row', alignItems: 'baseline'}}>
{marker}
<Text selectable={true}>
Some text.
<View
style={{
flexDirection: 'row',
alignItems: 'baseline',
backgroundColor: '#eee',
}}>
{marker}
<Text>Text inside View.</Text>
{marker}
</View>
</Text>
{marker}
</View>

<Text style={subtitleStyle}>{'<TextInput/>:'}</Text>
<View style={{flexDirection: 'row', alignItems: 'baseline'}}>
{marker}
Expand Down Expand Up @@ -750,26 +731,6 @@ exports.examples = [
);
},
},
{
title: 'Inline views',
render: function() {
return (
<View>
<Text>
This text contains an inline blue view{' '}
<View
style={{width: 25, height: 25, backgroundColor: 'steelblue'}}
/>{' '}
and an inline image{' '}
<Image
source={require('./flux.png')}
style={{width: 30, height: 11, resizeMode: 'cover'}}
/>. Neat, huh?
</Text>
</View>
);
},
},
{
title: 'Text shadow',
render: function() {
Expand Down Expand Up @@ -843,31 +804,6 @@ exports.examples = [
);
},
},
{
title: 'Nested content',
render: function() {
return (
<Text>
This text has a view
<View style={{borderColor: 'red', borderWidth: 1}}>
<Text style={{borderColor: 'blue', borderWidth: 1}}>which has</Text>
<Text style={{borderColor: 'green', borderWidth: 1}}>
another text inside.
</Text>
<Text style={{borderColor: 'yellow', borderWidth: 1}}>
And moreover, it has another view
<View style={{borderColor: 'red', borderWidth: 1}}>
<Text style={{borderColor: 'blue', borderWidth: 1}}>
with another text inside!
</Text>
</View>
</Text>
</View>
Because we need to go deeper.
</Text>
);
},
},
{
title: 'Dynamic Font Size Adjustment',
render: function(): React.Element<any> {
Expand Down

0 comments on commit 0366349

Please sign in to comment.