Skip to content

docs: initial props demo docs & demos#298

Merged
artus9033 merged 4 commits intomainfrom
feat/initial-props-demo-docs
Apr 10, 2026
Merged

docs: initial props demo docs & demos#298
artus9033 merged 4 commits intomainfrom
feat/initial-props-demo-docs

Conversation

@artus9033
Copy link
Copy Markdown
Collaborator

Summary

This PR adds 2 enhancements:

image

Test plan

CI green + tested manually.

@artus9033 artus9033 requested review from hurali97 and thymikee April 10, 2026 09:29
@artus9033 artus9033 self-assigned this Apr 10, 2026
Copilot AI review requested due to automatic review settings April 10, 2026 09:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR clarifies how to pass initial root-component props into a React Native brownfield view across the public APIs, and updates the sample apps to pass an OS version label from native to JS and render it in the UI.

Changes:

  • Docs: disambiguate Android initialize(options) vs view/root initial props (createView(..., launchOptions)), and add initial-props notes for iOS/Android API references.
  • JS demos: accept nativeOsVersionLabel as an initial prop and display it (RNApp + Expo RNApp variants).
  • Native demos: pass OS version via initial props/launch options (Android fragment args; iOS SwiftUI wrapper).

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
docs/docs/docs/api-reference/react-native-brownfield/swift.mdx Adds guidance about passing root initial props via view(..., initialProps)
docs/docs/docs/api-reference/react-native-brownfield/objective-c.mdx Adds guidance about passing root initial props for Obj-C API
docs/docs/docs/api-reference/react-native-brownfield/kotlin.mdx Adds a note separating initialize(options) from createView(..., launchOptions) + explains launchOptions as initial props
docs/docs/docs/api-reference/react-native-brownfield/java.mdx Same as Kotlin docs note/launchOptions explanation
apps/RNApp/src/nativeHostContext.tsx Introduces context + hook for the native OS version label
apps/RNApp/src/HomeScreen.tsx Renders the OS version label when provided
apps/RNApp/src/App.tsx Accepts nativeOsVersionLabel initial prop and provides it via context
apps/ExpoApp55/RNApp.tsx Accepts and displays nativeOsVersionLabel initial prop
apps/ExpoApp54/RNApp.tsx Accepts and displays nativeOsVersionLabel initial prop
apps/AppleApp/Brownfield Apple App/components/ContentView.swift Passes nativeOsVersionLabel via initialProperties to the RN view
apps/AndroidApp/app/src/main/java/com/callstack/brownfield/android/example/MainActivity.kt Passes nativeOsVersionLabel via fragment ARG_LAUNCH_OPTIONS bundle

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/docs/docs/api-reference/react-native-brownfield/swift.mdx Outdated
Comment thread docs/docs/docs/api-reference/react-native-brownfield/objective-c.mdx Outdated
Comment thread apps/AppleApp/Brownfield Apple App/components/ContentView.swift
Copy link
Copy Markdown
Member

@hurali97 hurali97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@artus9033 artus9033 merged commit 41861ce into main Apr 10, 2026
14 checks passed
@artus9033 artus9033 deleted the feat/initial-props-demo-docs branch April 10, 2026 12:00
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