React-Native onLayout not smooth -
i have onlayout on gallery screen, when rotate screen, when calls onlayout it's not smooth @ all. on real device it's laggy. here video showing problem.
i can see part of other screen when rotating. there other way make screen rotate smoothly?
onlayout:
onlayout = event => { const { width, height } = dimensions.get('window') this.setstate({width, height}) }
then have onlayout on container view. , on other views , images, have conditional render.
for example:
height:(height > width) ? 500 : responsiveheight(80)
edit: first screen 1 renders correctly, children screens lag.
Comments
Post a Comment