Jacse / react-native-app-intro-slider

Simple and configurable app introduction slider for react native
MIT License
1.65k stars 330 forks source link

Fixed the rendering delays bug when app is first opened #238

Open nketia opened 3 years ago

nketia commented 3 years ago

There was about 5 seconds delay rendering the app-intro-slider when an app is first launched when tested on iOS. This delay wasn't happening in the earlier version of 2.0.1. This pull request is to fix that initial delay.

hkar19 commented 3 years ago

is it better to have width and height initially in state rather than on onLayout?

nketia commented 3 years ago

is it better to have width and height initially in state rather than on onLayout?

Yes. Having the width and height set in the state to window figures solves the issue.

hkar19 commented 3 years ago

i think due to this issue #224 , it is better to set width and height early to Dimensions.get('screen') values and keep setting width and height to state on onLayout,

as it will potentially break the goToSlide function. concerning line.

hkar19 commented 3 years ago

237