react-native-paper-dates icon indicating copy to clipboard operation
react-native-paper-dates copied to clipboard

fix landscape flickering bug

Open ibrahimtuna opened this issue 1 year ago • 0 comments

At landscape screens, date component was flickering due to infinite loop into useCallback hook. Here you may find an example: https://github.com/web-ridge/react-native-paper-dates/assets/52549674/c6db7e31-dda5-4128-bdc4-ae8ba897a36b

Due to React-Native issues onLayout triggers more than once when landscape mode, and its creates infinite loop. I added more checks than before to fix it. I am not familiar the entire library, might be better approach please carefully review it.

Thanks

ibrahimtuna avatar Jan 31 '24 14:01 ibrahimtuna