Last active
July 25, 2019 11:25
-
-
Save nojaf/64447db6b2ff1b364ff4eb2f4c50a2cd to your computer and use it in GitHub Desktop.
Fable bindings for https://github.com/Paratron/hookrouter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Hookrouter | |
open Fable.Core | |
open Fable.Core.JsInterop | |
open Fable.React | |
open Fable.React.Props | |
open System.Text.RegularExpressions | |
type InterceptedPath = | |
string option | |
let inline A (props: IHTMLProp list) (elems: ReactElement seq) : ReactElement = | |
ofImport "A" "hookrouter" (keyValueList CaseRules.LowerFirst props) elems | |
let AType: ReactElementType = import "A" "hookrouter" | |
let setLinkProps: props: obj -> obj = import "setLinkProps" "hookrouter" | |
let confirmNavigation: unit -> unit = import "confirmNavigation" "hookrouter" | |
let resetPath: unit -> unit = import "resetPath" "hookrouter" | |
let stopInterception: unit -> unit = import "stopInterception" "hookrouter" | |
let useControlledInterceptor: unit -> InterceptedPath * obj * obj * obj = import "useControlledInterceptor" "hookrouter" | |
let interceptRoute: previousRoute: string * nextRoute: string -> ResizeArray<string> = import "interceptRoute" "hookrouter" | |
let get: componentId: float -> obj option = import "get" "hookrouter" | |
let remove: componentId: float -> unit = import "remove" "hookrouter" | |
// let useInterceptor: handlerFn: (ResizeArray<obj option> -> obj option) -> (unit -> obj) = import "useInterceptor" "hookrouter" | |
let setobj: inObj: obj * ?replace: bool -> unit = import "setobj" "hookrouter" | |
let getobj: unit -> obj = import "getobj" "hookrouter" | |
let queryStringToObject: inStr: string -> obj = import "queryStringToObject" "hookrouter" | |
let objectToQueryString: inObj: obj -> string = import "objectToQueryString" "hookrouter" | |
let useobj: unit -> obj * obj = import "useobj" "hookrouter" | |
let useRedirect (fromURL: string) (toURL: string) (queryParams: obj option) (replace: bool option) : unit = import "useRedirect" "hookrouter" | |
let setBasepath: inBasepath: string -> unit = import "setBasepath" "hookrouter" | |
let getBasepath: unit -> string = import "getBasepath" "hookrouter" | |
let resolvePath: inPath: string -> string = import "resolvePath" "hookrouter" | |
let prepareRoute: inRoute: string -> Regex * ResizeArray<string> = import "prepareRoute" "hookrouter" | |
let navigate: url: string -> unit = import "navigate" "hookrouter" | |
let setPath: inPath: string -> unit = import "setPath" "hookrouter" | |
let getPath: unit -> string = import "getPath" "hookrouter" | |
let usePath: unit -> string = import "usePath" "hookrouter" | |
let updatePathHooks: unit -> unit = import "updatePathHooks" "hookrouter" | |
let getWorkingPath: parentRouterId: string -> string = import "getWorkingPath" "hookrouter" | |
let useRoutes: routeObj: obj -> ReactElement option = import "useRoutes" "hookrouter" | |
let useTitle: inString: string -> unit = import "useTitle" "hookrouter" | |
let getTitle: unit -> string = import "getTitle" "hookrouter" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment