Skip to content

Implement getNativeScrollRef#1041

Closed
j-piasecki wants to merge 9 commits into
Shopify:mainfrom
j-piasecki:getNativeScrollRef
Closed

Implement getNativeScrollRef#1041
j-piasecki wants to merge 9 commits into
Shopify:mainfrom
j-piasecki:getNativeScrollRef

Conversation

@j-piasecki

Copy link
Copy Markdown
Contributor

Description

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

Reviewers’ hat-rack 🎩

Screenshots or videos (if needed)

Checklist

@j-piasecki

Copy link
Copy Markdown
Contributor Author

@naqvitalha Can this be merged since the corresponding PR in recyclerlistview has been merged & released, or is anything else blocking this?

github-merge-queue Bot pushed a commit to software-mansion/react-native-reanimated that referenced this pull request Jul 9, 2024
## Summary

This PR adds `FlatList` and `FlashList` examples in the example app
showing the usage of the `scrollTo` function. It also mentions the
`FlatList` (yet only this) support in docs.

## Example recordings

| Paper | Fabric |
|-|-|
| <video
src="https://github.com/software-mansion/react-native-reanimated/assets/52978053/2e38a4b0-56fa-4d3e-8ff2-4a1de5d75d62"
/> | <video
src="https://github.com/software-mansion/react-native-reanimated/assets/52978053/813d8b96-304b-4460-8a22-6fcbf722b2ca"
/> |

## Remarks

- `FlashList` supports `scrollTo` only on paper,
- fabric doesn't support it yet.
[This](Shopify/flash-list#1041) PR will fix the
issue.

---------

Co-authored-by: Tomek Zawadzki <tomasz.zawadzki@swmansion.com>
@j-piasecki

j-piasecki commented Oct 29, 2024

Copy link
Copy Markdown
Contributor Author

Hey! @naqvitalha is there a chance to merge this?

@tomekzaw

Copy link
Copy Markdown

@naqvitalha I can confirm this PR fixes scrollTo for FlashList in Reanimated.

github-merge-queue Bot pushed a commit to software-mansion/react-native-reanimated that referenced this pull request Jan 13, 2025
## Summary

This PR bumps `react-native` in paper-example and fabric-example from
`0.76.5` to `0.77.0-rc.6` (golden RC) accordingly to
https://react-native-community.github.io/upgrade-helper/?from=0.76.5&to=0.77.0-rc.6.

Apart from this, changes have been made in macos-example, tvos-example
and web-example to align versions of common native dependencies so they
are hoisted by yarn.

I had to patch `@shopify/flash-list`:
* Shopify/flash-list#1466 – fixes Android
build
* Shopify/flash-list#1041 – fixes `scrollTo`
example

Changes required by Reanimated to support RN 0.77 have been moved to
separate PRs for the sake of atomicity and transparency:
* #6875
* #6876
* #6883
* #6884

## Test plan

---------

Co-authored-by: Krzysztof Piaskowy <krzysztof.piaskowy@swmansion.com>
@Yusang-park

Copy link
Copy Markdown

when can you merge this PR?

tjzel pushed a commit to software-mansion/react-native-reanimated that referenced this pull request Feb 17, 2025
This PR bumps `react-native` in paper-example and fabric-example from
`0.76.5` to `0.77.0-rc.6` (golden RC) accordingly to
https://react-native-community.github.io/upgrade-helper/?from=0.76.5&to=0.77.0-rc.6.

Apart from this, changes have been made in macos-example, tvos-example
and web-example to align versions of common native dependencies so they
are hoisted by yarn.

I had to patch `@shopify/flash-list`:
* Shopify/flash-list#1466 – fixes Android
build
* Shopify/flash-list#1041 – fixes `scrollTo`
example

Changes required by Reanimated to support RN 0.77 have been moved to
separate PRs for the sake of atomicity and transparency:
* #6875
* #6876
* #6883
* #6884

---------

Co-authored-by: Krzysztof Piaskowy <krzysztof.piaskowy@swmansion.com>
tjzel pushed a commit to software-mansion/react-native-reanimated that referenced this pull request Feb 17, 2025
This PR bumps `react-native` in paper-example and fabric-example from
`0.76.5` to `0.77.0-rc.6` (golden RC) accordingly to
https://react-native-community.github.io/upgrade-helper/?from=0.76.5&to=0.77.0-rc.6.

Apart from this, changes have been made in macos-example, tvos-example
and web-example to align versions of common native dependencies so they
are hoisted by yarn.

I had to patch `@shopify/flash-list`:
* Shopify/flash-list#1466 – fixes Android
build
* Shopify/flash-list#1041 – fixes `scrollTo`
example

Changes required by Reanimated to support RN 0.77 have been moved to
separate PRs for the sake of atomicity and transparency:
* #6875
* #6876
* #6883
* #6884

---------

Co-authored-by: Krzysztof Piaskowy <krzysztof.piaskowy@swmansion.com>
patrycjakalinska pushed a commit to software-mansion/react-native-reanimated that referenced this pull request Mar 12, 2025
This PR bumps `react-native` in paper-example and fabric-example from
`0.76.5` to `0.77.0-rc.6` (golden RC) accordingly to
https://react-native-community.github.io/upgrade-helper/?from=0.76.5&to=0.77.0-rc.6.

Apart from this, changes have been made in macos-example, tvos-example
and web-example to align versions of common native dependencies so they
are hoisted by yarn.

I had to patch `@shopify/flash-list`:
* Shopify/flash-list#1466 – fixes Android
build
* Shopify/flash-list#1041 – fixes `scrollTo`
example

Changes required by Reanimated to support RN 0.77 have been moved to
separate PRs for the sake of atomicity and transparency:
* #6875
* #6876
* #6883
* #6884

---------

Co-authored-by: Krzysztof Piaskowy <krzysztof.piaskowy@swmansion.com>
patrycjakalinska pushed a commit to software-mansion/react-native-reanimated that referenced this pull request Mar 13, 2025
This PR bumps `react-native` in paper-example and fabric-example from
`0.76.5` to `0.77.0-rc.6` (golden RC) accordingly to
https://react-native-community.github.io/upgrade-helper/?from=0.76.5&to=0.77.0-rc.6.

Apart from this, changes have been made in macos-example, tvos-example
and web-example to align versions of common native dependencies so they
are hoisted by yarn.

I had to patch `@shopify/flash-list`:
* Shopify/flash-list#1466 – fixes Android
build
* Shopify/flash-list#1041 – fixes `scrollTo`
example

Changes required by Reanimated to support RN 0.77 have been moved to
separate PRs for the sake of atomicity and transparency:
* #6875
* #6876
* #6883
* #6884

---------

Co-authored-by: Krzysztof Piaskowy <krzysztof.piaskowy@swmansion.com>
@freeboub

freeboub commented Apr 3, 2025

Copy link
Copy Markdown

+1 ( painful notification, I know :D )

@pchalupa

Copy link
Copy Markdown

@j-piasecki good job! 👍 This patch fixed the usage of scrollTo in reanimated.

@n3ps

n3ps commented May 21, 2025

Copy link
Copy Markdown

+1

@naqvitalha

Copy link
Copy Markdown
Collaborator

v2 has this API already and is optimized for new arch. I'll close this for now. Apologies for the long wait

@naqvitalha naqvitalha closed this May 30, 2025
r0h0gg6 pushed a commit to r0h0gg6/react-native-reanimated that referenced this pull request Jul 28, 2025
This PR bumps `react-native` in paper-example and fabric-example from
`0.76.5` to `0.77.0-rc.6` (golden RC) accordingly to
https://react-native-community.github.io/upgrade-helper/?from=0.76.5&to=0.77.0-rc.6.

Apart from this, changes have been made in macos-example, tvos-example
and web-example to align versions of common native dependencies so they
are hoisted by yarn.

I had to patch `@shopify/flash-list`:
* Shopify/flash-list#1466 – fixes Android
build
* Shopify/flash-list#1041 – fixes `scrollTo`
example

Changes required by Reanimated to support RN 0.77 have been moved to
separate PRs for the sake of atomicity and transparency:
* software-mansion#6875
* software-mansion#6876
* software-mansion#6883
* software-mansion#6884

---------

Co-authored-by: Krzysztof Piaskowy <krzysztof.piaskowy@swmansion.com>
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.

7 participants