You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* docs: clear documentation on initial properties from native to RN
* feat(demo): demonstrate initial props from native to root RN component
* docs: changes after self-CR
Copy file name to clipboardExpand all lines: docs/docs/docs/api-reference/react-native-brownfield/java.mdx
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,10 @@ A function used to initialize a React Native Brownfield singleton. Keep in mind
64
64
65
65
> `*` - From the marked fields, exactly one must be specified, excluding the others. See examples below.
66
66
67
-
**Available options:**
67
+
> [!Note]
68
+
> The `options` map for `initialize` is unrelated to the initial props passed to the root component. For passing in initial props, use the [`launchOptions` argument of `createView`](#createview).
69
+
70
+
**Available `options` entries:**
68
71
69
72
-`useDeveloperSupport`: `Boolean` - Flag to use dev support.
70
73
-`packages`: `List<ReactPackage>` - List of your React Native Native modules.
@@ -167,6 +170,8 @@ Creates a React Native view with a given module name. It automatically uses an i
167
170
168
171
Returns: `FrameLayout` - A view containing the React Native component.
169
172
173
+
Root initial props can be passed through the `launchOptions` argument. That `Bundle` is forwarded as the root view's initial properties - the same concept as [initial props on `ReactRootView`](https://reactnative.dev/docs/communication-android#passing-properties-from-native-to-react-native).
Copy file name to clipboardExpand all lines: docs/docs/docs/api-reference/react-native-brownfield/kotlin.mdx
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,10 @@ A function used to initialize a React Native Brownfield singleton. Keep in mind
47
47
48
48
> `*` - From the marked fields, exactly one must be specified, excluding the others. See examples below.
49
49
50
-
**Available options:**
50
+
> [!Note]
51
+
> The `options` map for `initialize` is unrelated to the initial props passed to the root component. For passing in initial props, use the [`launchOptions` argument of `createView`](#createview).
52
+
53
+
**Available `options` entries:**
51
54
52
55
-`useDeveloperSupport`: `Boolean` - Flag to use dev support.
53
56
-`packages`: `List<ReactPackage>` - List of your React Native Native modules.
@@ -146,6 +149,8 @@ Creates a React Native view with a given module name. It automatically uses an i
146
149
147
150
Returns: `FrameLayout` - A view containing the React Native component.
148
151
152
+
Root initial props can be passed through the `launchOptions` argument. That `Bundle` is forwarded as the root view's initial properties - the same concept as [initial props on `ReactRootView`](https://reactnative.dev/docs/communication-android#passing-properties-from-native-to-react-native).
Copy file name to clipboardExpand all lines: docs/docs/docs/api-reference/react-native-brownfield/objective-c.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,8 @@ Creates a React Native view for the specified module name.
69
69
| `initialProps` | No | `NSDictionary` | Initial properties to be passed to React Native component. |
70
70
| `launchOptions` | No | `NSDictionary` | Launch options, typically passed from AppDelegate. |
71
71
72
+
Root initial props can be passed through the `initialProps` argument. That `NSDictionary` is forwarded as the root view's initial properties - the same concept as [initial props on `RCTRootView`](https://reactnative.dev/docs/communication-ios#passing-properties-from-native-to-react-native).
0 commit comments