Commit 2711117
authored
fix(android): default ScreenStackHeaderSubview type is LEFT (#3619)
## Description
<!--
Description and motivation for this PR.
This section should include "what & why".
Please link all related issues that merging this PR should close,
by using the `Closes #<issue-number>` syntax.
For example:
Closes #12345.
-->
The default value for. the `ScreenStackHeaderSubview` type is `LEFT`.
This can also be derived from the codegen spec:
https://github.com/software-mansion/react-native-screens/blob/c72539d598d37ccbcd44a380ce017441fc8b3eed/src/fabric/ScreenStackHeaderSubviewNativeComponent.ts#L15
Now, its important that the native side always matches the codegen side.
I noticed this since i was turning on the new props 2.0 diffing
mechanism. With that enabled, you won't receive props on the native view
manager side that are equal to the default prop value.
See here:
<img width="2841" height="525" alt="Screenshot 2026-02-04 at 16 43 38"
src="https://github.com/user-attachments/assets/3ae47738-7e75-4d8a-b24f-a04e80c096e3"
/>
This is not a bug in react-native, that's how they intended it, see this
issue:
-
facebook/react-native#55249 (comment)
## Changes
<!--
This is "how" of the PR description.
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
-->
Change default type from right to left to match codegen spec.
## Before & after - visual documentation
<!--
This section is MANDATORY for any PR that introduces any visual changes.
If your PR does not introduce such changes, please omit this section.
Consider using a table here to position the recordings / screenshots
next to each other.
| Before | After |
| --- | --- |
|  |  |
Alternatively add two sections - Before & After
### Before
### After
-->
## Test plan
<!--
Please name all newly added and existing test files that you tested the
changes with.
This section should also contain short description of steps to reproduce
the issue.
The reproduction code should be minimal & complete. 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 / created local changelog entries in relevant test files.
- [ ] For visual changes, included screenshots / GIFs / recordings
documenting the change.
- [ ] For API changes, updated relevant public types.
- [ ] Ensured that CI passes1 parent c72539d commit 2711117
1 file changed
Lines changed: 1 addition & 1 deletion
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
0 commit comments