Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement getNativeScrollRef #776

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

j-piasecki
Copy link

This PR adds implementation for getNativeScrollRef. It's required for compatibility with react-native-reanimated on the new architecture: https://github.com/software-mansion/react-native-reanimated/blob/720fefba7cd53471e98d52282c783701233861a7/src/reanimated2/hook/useAnimatedRef.ts#L26-L33

@@ -25,4 +25,9 @@ export default abstract class BaseScrollComponent extends React.Component<Scroll
public getScrollableNode(): number | null {
return null;
}

//Override and return ref to your custom scrollview. Useful if you need to use Animated Events on the new architecture.
public getNativeScrollRef(): unknown | null {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it need to be unknown?

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.

None yet

2 participants