4

I am using react-native-navigation library to navigate through screens in my app, the problem is that if I navigate to a screen by pressing a button and press fast multiple times then that particular screen opens multiple times. My question is if it's there any possibility to check if a screen exists in the stack before pushing it, I wonder if exist any method or property from which I can get the stack with the components ids.

PS: I don't want to disable the button after first tap.

Ioana B
  • 195
  • 3
  • 16

1 Answers1

0

You can throttle the function where the button click event is handled. lodash.throttle can be used quite easily for this.

guy.gc
  • 3,359
  • 2
  • 24
  • 39