-
I have screens with Save buttons that I disable when submitting (using Formik), ex: <SaveButton onPress={formikbag.handleSubmit} disabled={formikbag.isSubmitting}> However, there is a brief period when the screen re-renders while the transition is happening, where I see that React Navigation used to have <SaveButton onPress={formikbag.handleSubmit} disabled={formikbag.isSubmitting || navigation.isTransitioning}> |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
If you want to check when the screen is transitioning, you can add listeners on Though not sure why users can tap on a disabled button. Maybe you should add a debounce on your |
Beta Was this translation helpful? Give feedback.
If you want to check when the screen is transitioning, you can add listeners on
transitionStart
andtransitionEnd
: https://reactnavigation.org/docs/stack-navigator/#eventsThough not sure why users can tap on a disabled button. Maybe you should add a debounce on your
onPress
to avoid multiple taps.