peter-mach / react-navigation-is-focused-hoc

Ready to use solution using HOC to expose props.isFocused for react-navigation. No Redux needed.
MIT License
169 stars 21 forks source link

Delay/Slowness when navigating #13

Open khumphrey-sb opened 6 years ago

khumphrey-sb commented 6 years ago

Steps to reproduce

  1. Implement react-navigation-is-focused-hoc
  2. use decorator @withNavigationFocus('MyControl')
  3. slowness/delay when navigating

Expected behaviour

Navigation should occur without delay.

Actual behaviour

There is a very noticeable delay between when the press happens and when the navigation action starts.

Environment

iOS simulator 11.2, Android Pixel 2 simulator, iPhone 6 physical device running 11.2

react-navigation-is-focused-hoc

Version: "react-navigation-is-focused-hoc": "^1.1.1"

Commenting out updateFocus(currentState) in the onNavigationStateChange makes the delay go away.

I've currently only decorated two of my screen controls in a large existing app with HOC for testing. The events are working fine, but the delay after the press makes it a non starter. I can try to replicate using a smaller app but was wondering if anyone had seen this before.

mikeduminy commented 6 years ago

I'm also experiencing this problem.

anasvemmully commented 8 months ago

+1