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

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -