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 -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -