elmish-browser


Routing and navigation for browser apps

This library helps you turn URLs into nicely structured data, handle browser address change events and manipulate browser history directly.

Installation

1: 
paket add nuget Fable.Elmish.Browser

Routing

Intercept browser address changes and feed them into the dispatch loop.

Usage:

1: 
2: 
3: 
4: 
5: 
open Elmish.Navigation

Program.mkProgram init update view
|> Program.toNavigable parser urlUpdate
|> Program.run

For more information see the routing tutorial.

Navigation

Manipulate the browser's navigation and history.

Usage:

1: 
2: 
3: 
4: 
open Elmish.Navigation

let update model msg =
    model, Navigation.newUrl "some_other_location"

For details see the Navigation module.

val update : model:'a -> msg:'b -> 'a * 'c
val model : 'a
val msg : 'b