diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644
index 0000000..1bfc805
--- /dev/null
+++ b/Directory.Build.props
@@ -0,0 +1,27 @@
+
+
+
+ https://fable.io
+ https://github.com/fable-compiler/fable-react-native
+ LICENSE
+ README.md
+ fable_logo.png
+ fsharp;fable;javascript;f#;js;react;react native
+ Fable contributors
+ true
+
+
+ true
+ true
+ true
+ snupkg
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fable_logo.png b/fable_logo.png
new file mode 100644
index 0000000..7755942
Binary files /dev/null and b/fable_logo.png differ
diff --git a/paket.dependencies b/paket.dependencies
index 4c1f38d..d62ce64 100644
--- a/paket.dependencies
+++ b/paket.dependencies
@@ -2,7 +2,7 @@ source https://www.nuget.org/api/v2
storage:none
nuget Fable.Core
-nuget Fable.React
+nuget Fable.React.Types prerelease
nuget Fable.Promise
group Build
diff --git a/paket.lock b/paket.lock
index ee8897f..384ef72 100644
--- a/paket.lock
+++ b/paket.lock
@@ -1,30 +1,33 @@
STORAGE: NONE
NUGET
remote: https://www.nuget.org/api/v2
- Fable.Browser.Blob (1.1) - restriction: >= netstandard2.0
+ Fable.Browser.Blob (1.2) - restriction: >= netstandard2.0
Fable.Core (>= 3.0) - restriction: >= netstandard2.0
- FSharp.Core (>= 4.6.2) - restriction: >= netstandard2.0
- Fable.Browser.Dom (2.2) - restriction: >= netstandard2.0
- Fable.Browser.Blob (>= 1.1) - restriction: >= netstandard2.0
- Fable.Browser.Event (>= 1.2.1) - restriction: >= netstandard2.0
- Fable.Browser.WebStorage (>= 1.0) - restriction: >= netstandard2.0
+ FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0
+ Fable.Browser.Dom (2.10) - restriction: >= netstandard2.0
+ Fable.Browser.Blob (>= 1.2) - restriction: >= netstandard2.0
+ Fable.Browser.Event (>= 1.5) - restriction: >= netstandard2.0
+ Fable.Browser.WebStorage (>= 1.1) - restriction: >= netstandard2.0
+ Fable.Core (>= 3.2.8) - restriction: >= netstandard2.0
+ FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0
+ Fable.Browser.Event (1.5) - restriction: >= netstandard2.0
+ Fable.Browser.Gamepad (>= 1.1) - restriction: >= netstandard2.0
Fable.Core (>= 3.0) - restriction: >= netstandard2.0
FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0
- Fable.Browser.Event (1.2.1) - restriction: >= netstandard2.0
+ Fable.Browser.Gamepad (1.1) - restriction: >= netstandard2.0
Fable.Core (>= 3.0) - restriction: >= netstandard2.0
- FSharp.Core (>= 4.7) - restriction: >= netstandard2.0
- Fable.Browser.WebStorage (1.0) - restriction: >= netstandard2.0
- Fable.Browser.Event (>= 1.0) - restriction: >= netstandard2.0
+ FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0
+ Fable.Browser.WebStorage (1.1) - restriction: >= netstandard2.0
+ Fable.Browser.Event (>= 1.5) - restriction: >= netstandard2.0
Fable.Core (>= 3.0) - restriction: >= netstandard2.0
- FSharp.Core (>= 4.5.2) - restriction: >= netstandard2.0
- Fable.Core (3.1.6)
- FSharp.Core (>= 4.7.1) - restriction: >= netstandard2.0
+ FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0
+ Fable.Core (3.7.1)
Fable.Promise (2.1)
Fable.Core (>= 3.1.5) - restriction: >= netstandard2.0
FSharp.Core (>= 4.7) - restriction: >= netstandard2.0
- Fable.React (7.2)
- Fable.Browser.Dom (>= 2.0.1) - restriction: >= netstandard2.0
- Fable.Core (>= 3.1.5) - restriction: >= netstandard2.0
+ Fable.React.Types (18.0.0-beta-002)
+ Fable.Browser.Dom (>= 2.4.4) - restriction: >= netstandard2.0
+ Fable.Core (>= 3.2.7) - restriction: >= netstandard2.0
FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0
FSharp.Core (5.0) - restriction: >= netstandard2.0
diff --git a/paket.references b/paket.references
index 9cdc7f8..241d77d 100644
--- a/paket.references
+++ b/paket.references
@@ -1,3 +1,3 @@
Fable.Core
-Fable.React
+Fable.React.Types
Fable.Promise
diff --git a/src/Fable.ReactNative.fs b/src/Fable.ReactNative.fs
index 2591fd1..f916b29 100644
--- a/src/Fable.ReactNative.fs
+++ b/src/Fable.ReactNative.fs
@@ -1605,6 +1605,11 @@ module Props =
module Helpers =
open Props
+ /// Instantiate an imported React component. The first two arguments must be string literals, "default" can be used for the first one.
+ /// Example: `ofImport "Map" "leaflet" {| x = 10; y = 50 |} []`
+ let inline ofImport<'P> (importMember: string) (importPath: string) (props: 'P) (children: ReactElement seq): ReactElement =
+ ReactBindings.React.createElement(import importMember importPath, props, children)
+
[]
// density independent pixels
let dip (_: float): ISizeUnit = jsNative
@@ -1653,6 +1658,8 @@ module Helpers =
let inline internal createElementWithObjProps(c: ReactElementType, props: obj, children: ReactElement seq) =
ReactBindings.React.createElement (c, props, children)
+ let inline str (s: string): ReactElement = unbox s
+
let inline text (props:ITextProperties list) (text:string): ReactElement =
createElement(RN.Text, props, [str text])
diff --git a/src/extra/react-native-camera/Fable.ReactNativeCamera.fs b/src/extra/react-native-camera/Fable.ReactNativeCamera.fs
index 0dbce2b..bc65015 100644
--- a/src/extra/react-native-camera/Fable.ReactNativeCamera.fs
+++ b/src/extra/react-native-camera/Fable.ReactNativeCamera.fs
@@ -3,6 +3,7 @@ namespace Fable.ReactNativeCamera
open Fable.Core
open Fable.Core.JsInterop
open Fable.React
+open Fable.ReactNative
module Props =
diff --git a/src/extra/react-native-dialog/Fable.ReactNativeDialog.fs b/src/extra/react-native-dialog/Fable.ReactNativeDialog.fs
index 50b30d4..414fdf3 100644
--- a/src/extra/react-native-dialog/Fable.ReactNativeDialog.fs
+++ b/src/extra/react-native-dialog/Fable.ReactNativeDialog.fs
@@ -3,6 +3,7 @@ namespace Fable.ReactNativeDialog
open Fable.Core
open Fable.Core.JsInterop
open Fable.React
+open Fable.ReactNative
open Fable.ReactNative.Props
type IButtonProperties =
@@ -55,19 +56,19 @@ module Helpers =
let title =
createObj [ ]
|> unbox
- ReactElementType.create Dialog.Title title [ str text ]
+ ReactBindings.React.createElement(Dialog.Title, title, [ str text ])
let description (text:string) : ReactElement =
let description =
createObj [ ]
|> unbox
- ReactElementType.create Dialog.Description description [ str text ]
+ ReactBindings.React.createElement(Dialog.Description, description, [ str text ])
let button (props:IButtonProperties list) : ReactElement =
- ReactElementType.create Dialog.Button (keyValueList CaseRules.LowerFirst props) []
+ ReactBindings.React.createElement(Dialog.Button, keyValueList CaseRules.LowerFirst props, [])
let input (props:IInputProperties list) : ReactElement =
- ReactElementType.create Dialog.Input (keyValueList CaseRules.LowerFirst props) []
+ ReactBindings.React.createElement(Dialog.Input, keyValueList CaseRules.LowerFirst props, [])
let container (props:IContainerProperties list) (children) : ReactElement =
- ReactElementType.create Dialog.Container (keyValueList CaseRules.LowerFirst props) children
\ No newline at end of file
+ ReactBindings.React.createElement(Dialog.Container, keyValueList CaseRules.LowerFirst props, children)
\ No newline at end of file
diff --git a/src/extra/react-native-maps/Fable.ReactNativeMaps.fs b/src/extra/react-native-maps/Fable.ReactNativeMaps.fs
index 4dcf2ef..ed43e08 100644
--- a/src/extra/react-native-maps/Fable.ReactNativeMaps.fs
+++ b/src/extra/react-native-maps/Fable.ReactNativeMaps.fs
@@ -2,9 +2,9 @@ namespace Fable.ReactNativeMaps
open Fable.Core
open Fable.Core.JsInterop
-open Fable.ReactNative.Props
-open Fable.React.Helpers
open Fable.React
+open Fable.ReactNative
+open Fable.ReactNative.Props
type Region =
class end
diff --git a/src/extra/react-native-modal-datetime-picker/Fable.ReactNativeDateTimePicker.fs b/src/extra/react-native-modal-datetime-picker/Fable.ReactNativeDateTimePicker.fs
index e222a73..26e78a9 100644
--- a/src/extra/react-native-modal-datetime-picker/Fable.ReactNativeDateTimePicker.fs
+++ b/src/extra/react-native-modal-datetime-picker/Fable.ReactNativeDateTimePicker.fs
@@ -2,8 +2,9 @@ namespace Fable.ReactNativeDateTimePicker
open System
open Fable.Core.JsInterop
-open Fable.ReactNative.Props
open Fable.React
+open Fable.ReactNative
+open Fable.ReactNative.Props
[]
module Helpers =
diff --git a/src/extra/react-native-signature-view/Fable.ReactNativeSignatureView.fs b/src/extra/react-native-signature-view/Fable.ReactNativeSignatureView.fs
index 01d5eff..7f55244 100644
--- a/src/extra/react-native-signature-view/Fable.ReactNativeSignatureView.fs
+++ b/src/extra/react-native-signature-view/Fable.ReactNativeSignatureView.fs
@@ -1,9 +1,10 @@
namespace Fable.ReactNativeSignatureView
+open Fable.Core
open Fable.Core.JsInterop
-open Fable.ReactNative.Props
open Fable.React
-open Fable.Core
+open Fable.ReactNative
+open Fable.ReactNative.Props
type SignatureViewRef() =
let signatureView = ref None