Skip to content

Commit a43e190

Browse files
committed
docs: reflect api changes
1 parent cdea780 commit a43e190

2 files changed

Lines changed: 29 additions & 29 deletions

File tree

docs/OBJECTIVE_C.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ Examples:
6868

6969
**Properties:**
7070

71-
| Property | Type | Default | Description |
72-
| -------------------- | --------- | -------------- | -------------------------------------------------- |
73-
| bridge | RCTBridge | nil | Launch options, typically passed from AppDelegate. |
74-
| entryFile | NSString | index | Path to JavaScript root. |
75-
| fallbackResource | NSString | nil | Path to bundle fallback resource. |
76-
| bundlePath | NSString | main.jsbundle | Path to bundle fallback resource. |
71+
| Property | Type | Default | Description |
72+
| -------------------------- | ----------------------- | -------------- | -------------------------------------------------- |
73+
| entryFile | NSString | index | Path to JavaScript root. |
74+
| fallbackResource | NSString | nil | Path to bundle fallback resource. |
75+
| bundlePath | NSString | main.jsbundle | Path to bundle fallback resource. |
76+
| reactNativeFactory | RCTReactNativeFactory | nil | React Native factory instance. |
7777

7878
---
7979

@@ -112,7 +112,7 @@ Examples:
112112

113113
#### ReactNativeViewController
114114

115-
A view controller that's rendering `RCTRootView` within its bounds. It automatically uses an instance of a bridge created in `startReactNative` method. It works well with exposed JavaScript module. It's the simplest way to embed React Native into your navigation stack.
115+
A view controller that's rendering React Native view within its bounds. It automatically uses an instance of a factory created in `startReactNative` method. It works well with exposed JavaScript module. It's the simplest way to embed React Native into your navigation stack.
116116

117117
You can import it from:
118118

@@ -129,7 +129,7 @@ You can import it from:
129129
| Param | Required | Type | Description |
130130
| ------------------ | --------- | ------------- | ------------------------------------------------------------- |
131131
| moduleName | Yes | NSString | Name of React Native component registered to `AppRegistry`. |
132-
| initialProperties | No | NSString | Initial properties to be passed to React Native component. |
132+
| initialProperties | No | NSDictionary | Initial properties to be passed to React Native component. |
133133

134134
Examples:
135135

@@ -138,7 +138,7 @@ Examples:
138138
```
139139
140140
```objc
141-
[[ReactNativeViewController alloc] initWithModuleName:@"ReactNative" andInitialProperties:@{@"score": 12}]
141+
[[ReactNativeViewController alloc] initWithModuleName:@"ReactNative" andInitialProperties:@{@"score": @12}]
142142
```
143143

144144
---

docs/SWIFT.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -68,26 +68,26 @@ You can import the object from:
6868

6969
**Statics:**
7070

71-
`shared()`
71+
`shared`
7272

7373
A singleton that keeps an instance of ReactNativeBrownfield object.
7474

7575
Examples:
7676

7777
```swift
78-
ReactNativeBrownfield.shared()
78+
ReactNativeBrownfield.shared
7979
```
8080

8181
---
8282

8383
**Properties:**
8484

85-
| Property | Type | Default | Description |
86-
| -------------------- | --------- | -------------- | -------------------------------------------------- |
87-
| bridge | RCTBridge | nil | Launch options, typically passed from AppDelegate. |
88-
| entryFile | NSString | index | Path to JavaScript root. |
89-
| fallbackResource | NSString | nil | Path to bundle fallback resource. |
90-
| bundlePath | NSString | main.jsbundle | Path to bundle fallback resource. |
85+
| Property | Type | Default | Description |
86+
| -------------------------- | ----------------------- | -------------- | -------------------------------------------------- |
87+
| entryFile | String | index | Path to JavaScript root. |
88+
| fallbackResource | String? | nil | Path to bundle fallback resource. |
89+
| bundlePath | String | main.jsbundle | Path to bundle fallback resource. |
90+
| reactNativeFactory | RCTReactNativeFactory? | nil | React Native factory instance. |
9191

9292
---
9393

@@ -101,32 +101,32 @@ Params:
101101

102102
| Param | Required | Type | Description |
103103
| ----------------------- | -------- | ------------- | ----------------------------------------------------- |
104-
| onBundleLoaded | No | () -> void | Callback invoked after JS bundle is fully loaded. |
105-
| launchOptions | No | NSDictionary | Launch options, typically passed from AppDelegate. |
104+
| onBundleLoaded | No | (() -> Void)? | Callback invoked after JS bundle is fully loaded. |
105+
| launchOptions | No | [AnyHashable: Any]? | Launch options, typically passed from AppDelegate. |
106106

107107
Examples:
108108

109109
```swift
110-
ReactNativeBrownfield.shared().startReactNative()
110+
ReactNativeBrownfield.shared.startReactNative()
111111
```
112112

113113
```swift
114-
ReactNativeBrownfield.shared().startReactNative {
114+
ReactNativeBrownfield.shared.startReactNative(onBundleLoaded: {
115115
print("React Native started")
116-
}
116+
})
117117
```
118118

119119
```swift
120-
ReactNativeBrownfield.shared().startReactNative({
120+
ReactNativeBrownfield.shared.startReactNative(onBundleLoaded: {
121121
print("React Native started")
122-
}, launchOptions)
122+
}, launchOptions: launchOptions)
123123
```
124124

125125
---
126126

127127
#### ReactNativeViewController
128128

129-
A view controller that's rendering `RCTRootView` within its bounds. It automatically uses an instance of a bridge created in `startReactNative` method. It works well with exposed JavaScript module. It's the simplest way to embed React Native into your navigation stack.
129+
A view controller that's rendering React Native view within its bounds. It automatically uses an instance of a factory created in `startReactNative` method. It works well with exposed JavaScript module. It's the simplest way to embed React Native into your navigation stack.
130130

131131
You can import it from:
132132

@@ -138,12 +138,12 @@ You can import it from:
138138

139139
**Constructors:**
140140

141-
`ReactNativeViewController(moduleName: moduleName, initialProperites:initialProperties)`
141+
`ReactNativeViewController(moduleName: moduleName, initialProperties: initialProperties)`
142142

143143
| Param | Required | Type | Description |
144144
| ------------------ | --------- | ------------- | ------------------------------------------------------------- |
145-
| moduleName | Yes | NSString | Name of React Native component registered to `AppRegistry`. |
146-
| initialProperties | No | NSString | Initial properties to be passed to React Native component. |
145+
| moduleName | Yes | String | Name of React Native component registered to `AppRegistry`. |
146+
| initialProperties | No | [String: Any]? | Initial properties to be passed to React Native component. |
147147

148148
Examples:
149149

@@ -152,7 +152,7 @@ Examples:
152152
```
153153

154154
```swift
155-
ReactNativeViewController(moduleName: "ReactNative", initialProperites:["score": 12])
155+
ReactNativeViewController(moduleName: "ReactNative", initialProperties: ["score": 12])
156156
```
157157

158158
---

0 commit comments

Comments
 (0)