Skip to content

Instantly share code, notes, and snippets.

@anton-gorbikov
Created February 1, 2020 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anton-gorbikov/ff9502c2d6b78869a85f456565586a62 to your computer and use it in GitHub Desktop.
Save anton-gorbikov/ff9502c2d6b78869a85f456565586a62 to your computer and use it in GitHub Desktop.
fable-routing-browser-router
module ReactRouter.BrowserRouter
open Fable.Core
open Fable.Core.JsInterop
open Fable.React
type BrowserRouterProps =
| BaseName of string
| GetUserConfirmation of (string -> (bool -> unit) -> unit)
| ForceRefresh of bool
| KeyLength of int
let inline BrowserRouter (props: BrowserRouterProps list) (elems: ReactElement list): ReactElement =
ofImport "BrowserRouter" "react-router-dom" (keyValueList CaseRules.LowerFirst props) elems
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment