@playfast/reform-react-native 1.0.1 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.tsx +4 -13
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playfast/reform-react-native",
|
|
3
3
|
"playbook": "./playbook",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.1.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "React Native host for reform — registers a scene as a zero-arg root component for Expo or bare React Native.",
|
|
7
7
|
"keywords": [
|
package/src/index.tsx
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import { type ComponentType, createElement } from 'react'
|
|
2
2
|
import { Reform } from '@playfast/reform-react'
|
|
3
|
-
import type { Scene } from '@playfast/reform'
|
|
3
|
+
import type { ReformOptions, Scene } from '@playfast/reform'
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
// `ManagedRuntime`, boots, and renders the scene — in a zero-arg component for
|
|
9
|
-
// Expo's `registerRootComponent` / `AppRegistry.registerComponent`.
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Build a React-Native root component that hosts a scene. Register the returned
|
|
13
|
-
* component with Expo's `registerRootComponent` (or `AppRegistry`).
|
|
14
|
-
*/
|
|
15
|
-
export const createReformRoot = (scene: Scene): ComponentType => {
|
|
16
|
-
const ReformRoot = (): ReturnType<typeof createElement> => createElement(Reform, { scene })
|
|
5
|
+
export const createReformRoot = (scene: Scene, options: ReformOptions = {}): ComponentType => {
|
|
6
|
+
const ReformRoot = (): ReturnType<typeof createElement> =>
|
|
7
|
+
createElement(Reform, { scene, options })
|
|
17
8
|
return ReformRoot
|
|
18
9
|
}
|