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

feat: support for RN 0.78 #2626

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

feat: support for RN 0.78 #2626

wants to merge 3 commits into from

Conversation

kkafar
Copy link
Member

@kkafar kkafar commented Jan 16, 2025

kkafar and others added 3 commits January 16, 2025 17:28
## Description

@kkafar:
Fixes #2594 

## Changes

<!--
Please describe things you've changed here, make a **high level**
overview, if change is simple you can omit this section.

For example:

- Updated `about.md` docs

-->

<!--

## Screenshots / GIFs

Here you can add screenshots / GIFs documenting your change.

You can add before / after section if you're changing some behavior.

### Before

### After

-->

## Test code and steps to reproduce

<!--
Please include code that can be used to test this change and short
description how this example should work.
This snippet should be as minimal as possible and ready to be pasted
into editor (don't exclude exports or remove "not important" parts of
reproduction example)
-->

## Checklist

- [ ] Included code example that can be used to test this change
- [ ] Updated TS types
- [ ] Updated documentation: <!-- For adding new props to native-stack
-->
- [ ]
https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md
- [ ]
https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md
- [ ]
https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx
- [ ]
https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx
- [ ] Ensured that CI passes
## Description

The `NativeViewHierarchyManager` argument in `.addUIBlock` is nullable.
(See
[`UIBlock::execute(...)`](https://github.com/facebook/react-native/blob/864c34e9f6c55319417633206e58cefc3c962e7d/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIBlock.kt#L12))

This PR fixes that definition and makes it nullable, and also checks for
null. In our case, we likely want to exit out of that and just do
nothing. (but lmk, I can also change to a throw)

<!--
Description and motivation for this PR.

Include Fixes #<number> if this is fixing some issue.

Fixes # .
-->

## Changes

- Fixed `NativeViewHierarchyManager` being nullable

<!--
Please describe things you've changed here, make a **high level**
overview, if change is simple you can omit this section.

For example:

- Updated `about.md` docs

-->

<!--

## Screenshots / GIFs

Here you can add screenshots / GIFs documenting your change.

You can add before / after section if you're changing some behavior.

### Before

### After

-->

## Test code and steps to reproduce

<!--
Please include code that can be used to test this change and short
description how this example should work.
This snippet should be as minimal as possible and ready to be pasted
into editor (don't exclude exports or remove "not important" parts of
reproduction example)
-->

## Checklist

- [ ] Included code example that can be used to test this change
- [ ] Updated TS types
- [ ] Updated documentation: <!-- For adding new props to native-stack
-->
- [ ]
https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md
- [ ]
https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md
- [ ]
https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx
- [ ]
https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx
- [x] Ensured that CI passes

---------

Co-authored-by: Kacper Kafara <[email protected]>
@mrousavy
Copy link
Contributor

heyo - nice work! are you planning on releasing a beta for RN 78-rc support? Specifically the mutation.parentTag and mutation.parent.componentName thingys are broken because of internal react-native Fabric changes.

@kkafar
Copy link
Member Author

kkafar commented Jan 30, 2025

Hey, I expect support for 0.78 to be released first in beta of 4.8.0 (a month from now?). We still have only-latest-version-support policy for Fabric and I do not want to switch for 0.78 too early.

@mrousavy
Copy link
Contributor

ok, understood. thx

I'm asking because that's the only thing blocking Nitro Views 😅

github-merge-queue bot pushed a commit to software-mansion/react-native-reanimated that referenced this pull request Feb 4, 2025
## Summary

Adds if checks for the RN 0.78 in native code, thanks to which package
builds on both - 0.78 nd 0.77.

## Checklist

- [ ] Upgrade `react-native-screens` when 0.78 support is added
(software-mansion/react-native-screens#2626)
- [ ] Upgrade `react-native-svg` when 0.78 support is added
(software-mansion/react-native-svg#2619)
- [ ] Upgrade `react-native-gesture-handler` when 0.78 support is added
(software-mansion/react-native-gesture-handler#3354)
- [ ] `react-native-pager-view` auto generated schema contains invalid
`StringEnumTypeAnnotation` fields and crashes build on Android

|| Fabric (iOS) | Fabric (Android) | Web | MacOS (not upgraded) | TVOS
(not upgraded) |
|-|-|-|-|-|-|
| Builds | ✅ | ✅ | ✅ | ✅ | ✅ |
| Runs   | ❌ | ❌ | ❌ | ✅ | ✅ |

*Apps where RN was upgraded don't run because of incompatible dependency
versions
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