fable-import-react-native-image-picker
Fable bindings for React Native Image Picker
Installation
Install fable-import-react-native and follow the instructions for that package.
Follow install instructions for react-native-image-picker and then:
$ npm install --save-dev fable-import-react-native-image-picker
Usage
Follow instructions for react-native-image-picker.
In F# project (.fsproj)
In F# script (.fsx)
#load "node_modules/able-import-react-native-image-picker/Fable.Import.ReactNativeImagePicker.fs"#load "node_modules/able-import-react-native-image-picker/Fable.Helpers.ReactNativeImagePicker.fs" open Fable.Coreopen Fable.Importmodule R = Fable.Helpers.Reactmodule RN = Fable.Import.ReactNativetype IP = ReactImagePicker.Globalsopen Fable.Helpers.ReactNativeImagePickeropen Fable.Helpers.ReactNativeImagePicker.Props ... showImagePicker [Title "Image picker"; AllowsEditing true] (fun result -> if not result.didCancel then if String.IsNullOrEmpty result.error then console.log("Image Uri: " + result.uri) else console.log("Error: " + result.error) else console.log("dialog canceled"))