简体   繁体   English

反应本机定义内联成本 styles

[英]React native cost of defining inline styles

I use inline styles absolutely everywhere in react native.我在 React Native 的任何地方都使用内联 styles。 I find it a much more convenient way of styling things.我发现这是一种更方便的样式设置方式。

<View
    style={{
        flexGrow: 1,
        flexShrink: 1,
        paddingRight: 16,
        flexDirection: 'row',
    }}
    />

I haven't seen any performance issues and it's quite a large app.我没有看到任何性能问题,而且它是一个相当大的应用程序。 What is the performance cost of doing this vs StyleSheet?与 StyleSheet 相比,这样做的性能成本是多少? How can I measure this performance impact?我如何衡量这种性能影响?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM