Skip to content

Conversation

@thealmarques
Copy link
Member

@thealmarques thealmarques commented Oct 21, 2025

In https://github.com/plexinc/react-native-client/pull/3697 I noticed that the lightning version had stopped working. After some debug I discovered that we need to have a custom implementation for:

1 - useAnimatedScrollHandler, in the react native app we rely on scrollY to determine when we need to expand/collapse the previews when going up.
2 - withDelay wasn't working but lighting animations already supports it we just have to pass the attribute on the config.

I tried to link this package but without success. After linking if I try to run pnpm plex-lng:dev I get:

~plex-lightning:dev: Error: Cannot find module 'react-native-reanimated/scripts/validate-worklets-version'

Another issue I had was the pnpm check:types on this codebase. I was having issues non related with my changes (I also had them on main).

In theory if you checkout the latest commit https://github.com/plexinc/react-native-client/pull/3697 and test these changes there it should work.

@thealmarques thealmarques self-assigned this Oct 21, 2025
@thealmarques
Copy link
Member Author

I created a local branch with react 18 to test the RN PR and seems to be working:

react-lightning-pr.mov

Copy link
Collaborator

@WillsonHaw WillsonHaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple nits

useAnimatedScrollHandler as useAnimatedScrollHandlerRN,
} from 'react-native-reanimated-original';

type UseAnimatedScrollHandlerFn = (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't this just be type UseAnimatedScrollHandlerFn = typeof useAnimatedScrollHandlerRN?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was having some typescript issues with the context type. If I spread the args everything seems more stable on the ts side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants