reactnativecn / react-native-website

React Native 中文网
https://reactnative.cn
MIT License
216 stars 327 forks source link

如何在视图渲染前获取视图RectBounding! #658

Closed zhuqingyv closed 1 year ago

zhuqingyv commented 1 year ago

我想要手动计算一些属性以控制视图渲染,并且不希望视图渲染完以后再执行变更,有办法实现么? 当先Layout事件去计算会导致屏幕闪动一下,这会影响用户的体验,因为用户能感知到这一变更

sunnylqm commented 1 year ago

可以先控制透明度渲染,测量完成后再修改透明度,配合reanimated的可以做到无闪烁,当然写起来也会比较麻烦

github-actions[bot] commented 1 year ago

👋 Hey there, it looks like there has been no activity on this issue in the last 90 days. Has the issue been fixed, or does it still require the community attention? This issue will be closed in the next 7 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 year ago

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.