react-native-css-tree icon indicating copy to clipboard operation
react-native-css-tree copied to clipboard

感觉您这个库太棒了

Open wangliguang opened this issue 6 years ago • 6 comments

您好,我是一名普通的ReactNative开发工程师。最近发现项目中的样式写的有些乱,想整理一下。调研后发现您这个库特别符合我们要求。为了我们更灵活的使用,我拜读了您的源码,但由于本人水平有限,一直捋不透您写这个库的整个想法。特此冒昧得问一下是否可以加一下您的微信或其他联系方式做一下交流。您有时间也可以加我微信13121529304,期待您的回复。万分感谢

wangliguang avatar Mar 21 '18 02:03 wangliguang

谢谢你的肯定,我没怎么用微信,你想问什么问题呢?

涅槃广广 [email protected]于2018年3月21日 周三上午10:46写道:

您好,我是一名普通的ReactNative开发工程师。最近发现项目中的样式写的有些乱,想整理一下。调研后发现您这个库特别符合我们要求。为了我们更灵活的使用,我拜读了您的源码,但由于本人水平有限,一直捋不透您写这个库的整个想法。特此冒昧得问一下是否可以加一下您的微信或其他联系方式做一下交流。您有时间也可以加我微信13121529304,期待您的回复。万分感谢

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/unadlib/react-native-css-tree/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/ARyVXB7KJjuDR0C0ECjPhkNyDli2Ud1-ks5tgb8GgaJpZM4Sy8GY .

unadlib avatar Mar 21 '18 03:03 unadlib

我看您的源码中,没有涉及到创建StyleSheet的方式来定义样式。最后返回的基本还是对象样式。项目中大量使用这种方式,会不会对性能有影响呢

wangliguang avatar Mar 21 '18 05:03 wangliguang

并不会,我有写文章分析这个情况,官方的StyleSheet其实比较鸡肋。

涅槃广广 [email protected]于2018年3月21日 周三下午1:16写道:

我看您的源码中,没有涉及到创建StyleSheet的方式来定义样式。最后返回的基本还是对象样式。项目中大量使用这种方式,会不会对性能有影响呢

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/unadlib/react-native-css-tree/issues/1#issuecomment-374835948, or mute the thread https://github.com/notifications/unsubscribe-auth/ARyVXHkjU2LdyWCyrK1RAYvK_0mbhWZ3ks5tgeIUgaJpZM4Sy8GY .

unadlib avatar Mar 21 '18 05:03 unadlib

如果搞多个{backgroundColor: 'red'}对象,据我理解RN官方就会自己创建多个StyleSheet对象,这种方式或许会比创建一个StyleSheet要浪费点内存

wangliguang avatar Mar 21 '18 06:03 wangliguang

本质上是object style. 看你怎么理解了.我认为一个大型的项目纯object style问题不大.我很多项目都没有用官方的StyleSheet. 不过确实没有做过性能测试比对,从模块的变量自动gc角度说,性能不会有什么问题

涅槃广广 [email protected]于2018年3月21日 周三下午2:05写道:

如果搞多个{backgroundColor: 'red'}对象,据我理解RN官方就会自己创建多个StyleSheet对象,这种方式或许会比创建一个StyleSheet要浪费点内存

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/unadlib/react-native-css-tree/issues/1#issuecomment-374841159, or mute the thread https://github.com/notifications/unsubscribe-auth/ARyVXFrSeZEqOXVlUOb07K_0KFCf7nbSks5tge2WgaJpZM4Sy8GY .

unadlib avatar Mar 21 '18 06:03 unadlib

当然这个库是基于原型链,理论上也会略有影响.

unadlib Galois [email protected]于2018年3月21日 周三下午2:08写道:

本质上是object style. 看你怎么理解了.我认为一个大型的项目纯object style问题不大.我很多项目都没有用官方的StyleSheet. 不过确实没有做过性能测试比对,从模块的变量自动gc角度说,性能不会有什么问题

涅槃广广 [email protected]于2018年3月21日 周三下午2:05写道:

如果搞多个{backgroundColor: 'red'}对象,据我理解RN官方就会自己创建多个StyleSheet对象,这种方式或许会比创建一个StyleSheet要浪费点内存

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/unadlib/react-native-css-tree/issues/1#issuecomment-374841159, or mute the thread https://github.com/notifications/unsubscribe-auth/ARyVXFrSeZEqOXVlUOb07K_0KFCf7nbSks5tge2WgaJpZM4Sy8GY .

unadlib avatar Mar 21 '18 06:03 unadlib