Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native: Allow Views to be nested inside of Text #15464

Merged
merged 1 commit into from
Apr 25, 2019

Conversation

rigdern
Copy link
Contributor

@rigdern rigdern commented Apr 21, 2019

This feature is now supported on both iOS and Android. The Android feature was merged a couple of weeks ago: facebook/react-native#23195.

Here's some sample React Native code that utilizes the inline view feature:

export default class App extends Component<Props> {
  render() {
    return (
      <View style={styles.background}>
        <Text>
          This is an{' '}
          <View style={{backgroundColor: 'steelblue', width: 10, height: 10}} />
          {' '}inline view.
        </Text>
      </View>
    );
  }
}

Output Before PR (Android)

image

Output After PR (Android)

image

Adam Comella
Microsoft Corp.

This feature is now supported on both iOS and Android. The Android feature was merged a couple of weeks ago: facebook/react-native#23195.
@sizebot
Copy link

sizebot commented Apr 21, 2019

Details of bundled changes.

Comparing: 0b50fb2...71e68a1

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactNativeRenderer-dev.js -0.0% -0.0% 628.2 KB 628.01 KB 133.32 KB 133.28 KB RN_FB_DEV
ReactNativeRenderer-prod.js -0.1% -0.2% 243.59 KB 243.36 KB 42.34 KB 42.27 KB RN_FB_PROD
ReactNativeRenderer-profiling.js -0.1% -0.1% 251.77 KB 251.61 KB 43.91 KB 43.88 KB RN_FB_PROFILING
ReactNativeRenderer-dev.js -0.0% -0.0% 628.12 KB 627.92 KB 133.29 KB 133.25 KB RN_OSS_DEV
ReactNativeRenderer-prod.js -0.1% -0.2% 243.61 KB 243.38 KB 42.34 KB 42.27 KB RN_OSS_PROD
ReactNativeRenderer-profiling.js -0.1% -0.1% 251.79 KB 251.63 KB 43.91 KB 43.88 KB RN_OSS_PROFILING
ReactFabric-dev.js -0.0% -0.0% 616.89 KB 616.69 KB 130.62 KB 130.58 KB RN_FB_DEV
ReactFabric-prod.js -0.4% -0.3% 237.36 KB 236.5 KB 41.08 KB 40.96 KB RN_FB_PROD
ReactFabric-profiling.js -0.1% -0.2% 245.02 KB 244.74 KB 42.69 KB 42.61 KB RN_FB_PROFILING
ReactFabric-dev.js -0.0% -0.0% 616.79 KB 616.6 KB 130.58 KB 130.54 KB RN_OSS_DEV
ReactFabric-prod.js -0.4% -0.3% 237.37 KB 236.5 KB 41.08 KB 40.95 KB RN_OSS_PROD
ReactFabric-profiling.js -0.1% -0.2% 245.03 KB 244.75 KB 42.69 KB 42.61 KB RN_OSS_PROFILING

Generated by 🚫 dangerJS

Copy link
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OMG this is so exciting! Just a heads up, we are currently investigating a small performance regression on Android and your PR may have to be reverted and relanded. We'll keep you up to date.

In the meantime, I'm going to merge this one so we can sync it to RN.

@cpojer cpojer merged commit a187e9b into facebook:master Apr 25, 2019
@Dimpletest
Copy link

Test comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants