You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am optimizing navigation in my TV app (mainly androidTV for now).
To reach a good quality, I use react-native-reanimated which works fine (Thanks to the team!)
But unfortunnately, I still have freeze during navigation due to the react architecture.
I use this library : https://github.com/kevinejohn/react-native-keyevent
To handle keyevents, it is very simple it catches the keyevent in android activity and forward it to JS thread.
Then in the app, the JS thread forward the keyevent to a focusManager and act on differents sharedValues to animate focus.
To sumup, when a keyPress is catched in android UI thread, then the information goes to JS thread and go back to UI thread.
This jump to JS thread causes the freeze (espcially when doing big data treatment).
As a solution I am thinking to handle keyevent callback directly in reanimated.
As sensors (just an exemple) are now handled I think it make sens to handle keyevents handling linked with reanimated.
Here is my question:
architecturally, how to implement it ?
I saw gesture handler is binded to reanimated So I have 3 possibilities:
In reanimated
In gesture handler
A new module binded on reanimated.
Please let me know if that request make sense and what is your point of view.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am optimizing navigation in my TV app (mainly androidTV for now).
To reach a good quality, I use react-native-reanimated which works fine (Thanks to the team!)
But unfortunnately, I still have freeze during navigation due to the react architecture.
I use this library : https://github.com/kevinejohn/react-native-keyevent
To handle keyevents, it is very simple it catches the keyevent in android activity and forward it to JS thread.
Then in the app, the JS thread forward the keyevent to a focusManager and act on differents sharedValues to animate focus.
To sumup, when a keyPress is catched in android UI thread, then the information goes to JS thread and go back to UI thread.
This jump to JS thread causes the freeze (espcially when doing big data treatment).
As a solution I am thinking to handle keyevent callback directly in reanimated.
As sensors (just an exemple) are now handled I think it make sens to handle keyevents handling linked with reanimated.
Here is my question:
I saw gesture handler is binded to reanimated So I have 3 possibilities:
Please let me know if that request make sense and what is your point of view.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions