Skip to content

cherry-pick(4.3-stable): animated host lookup fixes (#9589, #9680) + discovery example fix (#9733)#9737

Open
MatiPl01 wants to merge 3 commits into
4.3-stablefrom
@matipl01/4.3-stable/cherry-pick-#9589-#9680
Open

cherry-pick(4.3-stable): animated host lookup fixes (#9589, #9680) + discovery example fix (#9733)#9737
MatiPl01 wants to merge 3 commits into
4.3-stablefrom
@matipl01/4.3-stable/cherry-pick-#9589-#9680

Conversation

@MatiPl01

@MatiPl01 MatiPl01 commented Jun 23, 2026

Copy link
Copy Markdown
Member

Summary

Cherry-picking for Reanimated 4.3.2 release. #9680 depends on #9589, and #9733 fixes the InstanceDiscovery example that #9589 brings in (it threw on mount), so all three are included in this single PR (cherry-picked in order).

sorinc03 and others added 2 commits June 23, 2026 13:49
## Summary

Fixes #9587.

When `findHostInstance_DEPRECATED` is needed, Reanimated currently falls
back to resolving the animated wrapper instance unless the component
used `getAnimatableRef`. That can target the outer host view for
components that forward their `ref` to an inner host view.

This change prefers the resolved `_componentRef` whenever it is
available, preserving the existing fast path while making the deprecated
lookup follow the same ref target that `createAnimatedComponent`
captured.

## Test plan

```sh
yarn workspace react-native-reanimated test findHostInstance.test.ts --runInBand
yarn eslint packages/react-native-reanimated/src/platform-specific/findHostInstance.ts packages/react-native-reanimated/__tests__/findHostInstance.test.ts
git diff --check
```

---------

Co-authored-by: Mateusz Łopaciński <lop.mateusz.2001@gmail.com>
…86 (#9680)

## Summary


[#9589](#9589)
renamed the native-ref check from `_viewConfig` to `__viewConfig`.
Renderers older than RN 0.86 (e.g. react-native-macos 0.81) only expose
`_viewConfig`, so the fast path missed and `findHostInstance_DEPRECATED`
threw `Argument appears to not be a ReactComponent` for every animated
component. This accepts either key (`__viewConfig` first, `_viewConfig`
fallback); RN 0.86+ is unaffected.
@MatiPl01 MatiPl01 changed the title cherry-pick(4.3-stable): animated host lookup fixes (#9589, #9680) cherry-pick(4.3-stable): animated host lookup fixes (#9589, #9680) + discovery example fix (#9733) Jun 24, 2026
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.

3 participants