fable-elmish-browser

0.9.0-beta-1 • Public • Published

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 renamed map
  • Result return type has been replaced with Option

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"

Readme

Keywords

Package Sidebar

Install

npm i fable-elmish-browser

Weekly Downloads

1

Version

0.9.0-beta-1

License

Apache-2.0

Last publish

Collaborators

  • et1975