react-tv-space-navigation icon indicating copy to clipboard operation
react-tv-space-navigation copied to clipboard

Feature/react update 19

Open robmim opened this issue 8 months ago • 1 comments

Update expo to version 53 Update React and React-dom version from 18 to 19 Update react-native to 0.79.1-1 Update some dependencies using expo doctor

Everything is building. the example project is loading BUT...... The remote control mapping doesn't work. And since i do not have any error its hard for me to figure it out.

Thats a start i guess

robmim avatar May 01 '25 21:05 robmim

Thank you for this start, that's very helpful 🙌 ❤️ We'll try to have a look! I'll try to find an owner because I will be off for a month 😅

pierpo avatar May 02 '25 09:05 pierpo

Any update on this?

stavfx avatar Jun 02 '25 19:06 stavfx

Hey! I am back and finally got the chance to have a look.

Looks like react-native-keyevent is not working properly anymore. I'm not sure exactly, because I haven't deeply investigated.

However, now might be the time to switch to TVEventHandler for the remote control management. It makes more sense (it unifies between iOS & Android), does not require any external lib.

My only concern with TVEventHandler is that the apps would feel less snappy when the CPU is under heavy load. I need to test this again on low-end devices.

If you want to give it a try, simply try to replace the content of packages/example/src/components/remote-control/RemoteControlManager.android.ts with the content of packages/example/src/components/remote-control/RemoteControlManager.ios.ts. It should work right away with your PR 😁

Another path to investigate would be this new library to replace react-native-keyevent: https://github.com/tlow92/expo-key-event

pierpo avatar Jun 09 '25 16:06 pierpo

@pierpo just tried to paste the code fron the IOS to the android file for the ky mapping and it doesnt work. Still unable to use keyboard to navigate

robmim avatar Jun 11 '25 21:06 robmim

I have some spare time today. Will try to find a solution using TVEventHandler

robmim avatar Jun 12 '25 11:06 robmim

@robmim @pierpo

Need any help pushing this over the line, this is currently blocking an app I am building. As I want to use unistyles but that requires React 19 but also want to use this library.

Could we merge the fixes in and then fix the example app later?

EDIT: jokes unistyles does not work on tvos so not a huge need anymore shifting focus.

UrbanChrisy avatar Jun 17 '25 17:06 UrbanChrisy

@pierpo @UrbanChrisy

guys.... I don"t know what to say but i just reloaded the branch. built it and the navigation is WORKING !!!!

robmim avatar Jun 18 '25 17:06 robmim

Haha I knew it was weird that it didn't work properly! Because it did work for me 😂 Well done! Did you use the TVEventHandler or did you stick with react-native-keyevent? (because I think it really didn't work with react-native-keyevent)

pierpo avatar Jun 25 '25 08:06 pierpo

@pierpo no i stuck with react-native-keyevent. Dont ask me why it work now but it does. I think adding this PR to the librairy would make many peoples happy. Me first

robmim avatar Jul 02 '25 20:07 robmim

When is this change going to be merged and new package available for React version 19?

fuecco avatar Jul 03 '25 05:07 fuecco

Yes indeed 😊 I need to double check everything a bit, and maybe solve the ts-ignore, but I agree that we need to publish this 😁

pierpo avatar Jul 03 '25 09:07 pierpo

@pierpo i did just push a fix for those TS IGNORE and also revert back the bump version

robmim avatar Jul 03 '25 12:07 robmim

@pierpo i put back the comments i removed in node.tsx file from last commit. My bad

robmim avatar Jul 03 '25 13:07 robmim

Thanks - looking forward. Do you guys have a timeline for this to get published? With almost everything in place - do you think today is a possiblity?

fuecco avatar Jul 03 '25 15:07 fuecco

@robmim @pierpo ... Any update?

fuecco avatar Jul 03 '25 22:07 fuecco

Stumbled on this repo and can't use it with latest expo versions, would love to see this pull request merged; seems to be a really powerful library and well documented!

Apezdr avatar Jul 12 '25 04:07 Apezdr

I just tried again. Something's off, when I launched the app on my emulator the keyboard didn't work 🤔 I think I'll release this as beta so that people can try and be unblocked!

pierpo avatar Jul 12 '25 12:07 pierpo

I'll open another PR so that I can push. Yarn lock needs an update and I don't have write rights on the fork 😁

pierpo avatar Jul 12 '25 16:07 pierpo

I published v6.0.0-beta1 to unblock you. You might give it a try. I can't merge my PR yet because tests are broken for now 🤔 (for dependencies issues reasons, not features being broken)

pierpo avatar Jul 17 '25 07:07 pierpo

@pierpo I am using v6.0.0-beta1 with expo 54 and [email protected], but android emulator does not do anything in my case. is this the expected behavior? I am struggling to get navigation to work.

zsomborgellerfi avatar Nov 03 '25 10:11 zsomborgellerfi

Well, it certainly is not the expected behaviour 😂 Have you tried cleaning everything up and rebuilding? Including destroying the emulator? A few of us had this issue first and then it disappeared.

pierpo avatar Nov 03 '25 10:11 pierpo