bamlab / bamlab/react-tv-space-navigation

React native 0.78 compatibility

Open
#179 33 comments 0 reactions 0 assignees View on GitHub
Priority:High support
Dominant language
TypeScript
Stars
319
Forks
46
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Hi,

I'm in the process of migrating to React Native 0.78.0 and React 19, and there appear to be compatibility issues with the library in version 5.1.1.

**To Reproduce**

```tsx
import {Directions, SpatialNavigation} from 'react-tv-space-navigation';

import {LoggerService} from './logger.service.ts';
import {remoteControlService} from './remote-control.service.ts';
import {SupportedKeysEnum} from '../model/enums/supported-keys.enum.ts';

export class SpatialNavigationService {

private constructor() {
}

public static init(): void {
SpatialNavigation.configureRemoteControl({
remoteControlSubscriber: (callback) => {
const mapping: { [key in SupportedKeysEnum]: Directions | null } = {
[SupportedKeysEnum.Right]: Directions.RIGHT,
[SupportedKeysEnum.Left]: Directions.LEFT,
[SupportedKeysEnum.Up]: Directions.UP,
[SupportedKeysEnum.Down]: Directions.DOWN,
[SupportedKeysEnum.Enter]: Directions.ENTER,
[SupportedKeysEnum.Back]: null
};

const remoteControlListener = (keyEvent: SupportedKeysEnum): void => callback(mapping[keyEvent]);

return remoteControlService.addKeydownListener(remoteControlListener);
},
remoteControlUnsubscriber: (remoteControlListener): void => {
remoteControlService.removeKeydownListener(remoteControlListener);
},
});

LoggerService.info(`[SpatialNavigationService] Initialized spatial navigation service on TV`);
}

}

```

```tsx





```

**Expected behavior**
Application continues to work as it normally did in previous versions of React native (in my case 0.76.5).

**Screenshots**

![Image](https://github.com/user-attachments/assets/3b780deb-f5a4-4893-8e40-591dacf2deee)

![Image](https://github.com/user-attachments/assets/a281a24b-0ccc-4027-b164-6ce562ef749d)

![Image](https://github.com/user-attachments/assets/adba3287-e295-4c8a-9ab4-cff184e1d56d)

**Version and OS**
- Library version: 5.1.1
- React Native version: 0.78.0
- OS: Android

**Additional context**
Add any other context about the problem here.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported setup on Android with react-tv-space-navigation 5.1.1, React Native 0.78.0, and React 19 using the shown SpatialNavigation configuration and component tree. Compare it with React Native 0.76.5 and inspect the compatibility failure shown in the attached screenshots; done means the application works as before on the newer versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.