React native navigation v5 navigation.goBack() goes multiple screens back on android

Viewed 185

On react navigation v5, when you press the button multiple times it goes back multiple times. On ios it's okay, because the animation starts and you can't click more on the button.

const navigation = useNavigation();
const goBack = () => navigation.goBack();

I know i can use something like lodash once or debounce. But is there a better way? Because on ios it works fine.

0 Answers
Related