File tree Expand file tree Collapse file tree 3 files changed +14
-14
lines changed
packages/react-native-sandbox Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -44,16 +44,16 @@ import SandboxReactNativeView from '@callstack/react-native-sandbox';
44
44
45
45
### Component Props
46
46
47
- | Prop | Type | Required | Description |
48
- | ------| ------| ----------| -------------|
49
- | ` moduleName ` | ` string ` | ✅ | Name of the React Native module to load |
50
- | ` jsBundleSource ` | ` string ` | ❌ | Path or URL to JavaScript bundle |
51
- | ` initialProperties ` | ` object ` | ❌ | Initial props for the sandboxed app |
52
- | ` launchOptions ` | ` object ` | ❌ | Launch configuration options |
53
- | ` allowedTurboModules ` | ` string[] ` | ❌ | Additional TurboModules to allow |
54
- | ` onMessage ` | ` function ` | ❌ | Callback for messages from sandbox |
55
- | ` onError ` | ` function ` | ❌ | Callback for sandbox errors |
56
- | ` style ` | ` ViewStyle ` | ❌ | Container styling |
47
+ | Prop | Type | Required | Default | Description |
48
+ | ------| ------| ----------| ---------| --------- ----|
49
+ | ` moduleName ` | ` string ` | : ballot_box_with_check : | - | Name of the registered component to load from bundle specified in ` jsBundleSource ` |
50
+ | ` jsBundleSource ` | ` string ` | : ballot_box_with_check : | - | Name on file storage or URL to the JavaScript bundle to load |
51
+ | ` initialProperties ` | ` object ` | : white_large_square : | ` {} ` | Initial props for the sandboxed app |
52
+ | ` launchOptions ` | ` object ` | : white_large_square : | ` {} ` | Launch configuration options |
53
+ | ` allowedTurboModules ` | ` string[] ` | : white_large_square : | [ check here ] ( ./src/index.tsx#L18 ) | Additional TurboModules to allow |
54
+ | ` onMessage ` | ` function ` | : white_large_square : | ` undefined ` | Callback for messages from sandbox |
55
+ | ` onError ` | ` function ` | : white_large_square : | ` undefined ` | Callback for sandbox errors |
56
+ | ` style ` | ` ViewStyle ` | : white_large_square : | ` undefined ` | Container styling |
57
57
58
58
### Ref Methods
59
59
Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ export interface NativeProps extends ViewProps {
44
44
*/
45
45
moduleName : string
46
46
47
- /** Optional path or URL to the JavaScript bundle source */
48
- jsBundleSource ? : string
47
+ /** Name on file storage or URL to the JavaScript bundle to load */
48
+ jsBundleSource : string
49
49
50
50
/** Initial properties to pass to the sandboxed app's root component */
51
51
initialProperties ?: CodegenTypes . UnsafeMixed
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ export type SandboxReactNativeViewProps = ViewProps & {
67
67
* Optional path or URL to the JavaScript bundle to load.
68
68
* If not provided, the default bundle will be used.
69
69
*/
70
- jsBundleSource ? : string
70
+ jsBundleSource : string
71
71
72
72
/**
73
73
* Initial properties to pass to the sandboxed React Native app.
@@ -203,7 +203,7 @@ const SandboxReactNativeView = forwardRef<
203
203
const _onError = useCallback (
204
204
( e : NativeSyntheticEvent < ErrorEvent > ) => {
205
205
// @ts -ignore
206
- onError ?.( e . nativeEvent )
206
+ onError ?.( e . nativeEvent as ErrorEvent )
207
207
} ,
208
208
[ onError ]
209
209
)
You can’t perform that action at this time.
0 commit comments