fable-elmish-browser
v0.9.0-beta-1
Published
Browser extensions for fable-elmish apps.
Downloads
7
Readme
Elmish-browser: browser extras for Elmish apps.
Elmish-browser implements routing and navigation for elmish apps targeting browser (React and Snabbdom) renderers.
Installation
In a project directory with dotnet-fable
CLI tools installed, type:
dotnet fable add fable-powerpack fable-elmish fable-elmish-browser.
Porting from previous version of the parser
In addition to providing query parsing capabilities, this port from Elm/url-parser makes a few changes to the API:
format
has been renamedmap
Result
return type has been replaced withOption
If you've been using Result
type for other purposes, it is now available in F# 4.1 Core and is still available from Fable-PowerPack.
Routing: Combinators for parsing browser's url into a route
Usage:
open Elmish.Browser.Navigation
Program.mkProgram init update view
|> Program.toNavigable parser urlUpdate
|> Program.run
Navigation: Manipulate the browser's navigation and history
Usage:
open Elmish.Browser.Navigation
let update model msg =
model, Navigation.newUrl "some_other_location"