Conversation
kligarski
commented
Apr 21, 2026
Contributor
Author
kligarski
left a comment
There was a problem hiding this comment.
I decided not to mess with overriding children prop in Fabric specs but it's not a public API so it shouldn't be a problem.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens TypeScript typings for experimental/unstable Host components by making their children (and related header subview component fields) non-nullable, aligning with the repo’s exactOptionalPropertyTypes work and ensuring these hosts always receive renderable content.
Changes:
- Make
childrenrequired andNonNullable<...>forTabsHost,StackHost(gamma), andSplitHost(gamma). - Make Stack v5 Android header subview
childrenrequired and non-nullable. - Make Stack v5 Android header config subview
Componentfields non-nullable.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/components/tabs/host/TabsHost.types.ts | Makes TabsHost children required and non-nullable. |
| src/components/gamma/stack/host/StackHost.types.ts | Makes StackHost children non-nullable. |
| src/components/gamma/stack/header/android/StackHeaderSubview.android.types.ts | Makes header subview children required and non-nullable. |
| src/components/gamma/stack/header/StackHeaderConfig.android.types.ts | Makes toolbar/background subview Component non-nullable. |
| src/components/gamma/split/SplitHost.types.ts | Makes SplitHost children required and non-nullable. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
t0maboro
approved these changes
Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR is a follow-up to #3719. We adjust
childrenproperty to be not nullable forHostcomponents (Tabs, Split and Stack v5) and subviews in Stack v5 implementation.This change is applied only to unstable/experimental components so it shouldn't be considered a breaking change.
Changes
ReactNode/ViewProps['children']inNonNullablefor:StackHostTabsHostSplitHostStackHeaderSubviewand related places inStackHeaderConfigBefore & after - visual documentation
N/A
Test plan
yarn check-typesChecklist