Hey List,
I'm happy to announce the latest release of dispatch. What's notable about this release is that it includes out-of-the-box js_of_ocaml support. Specifically, it allows you to easily set up front-end applications to use the URI fragment to track state transitions and history. For example:
let fragment_thread =
Dispatch_js.dispatch_on_fragment ~default:"/" [
("/" , root_handler)
; ("/user/:id/", user_handler)
]
... creates a thread that will monitor for URI fragment changes and dispatch to the appropriate handler. In addition, it will set the initial fragment to "/" and ensure that the handler for that path is initially called; even if the fragment was already set to "/" when the thread started, dispatch will still occur.
Due to the API changes included in this release, webmachine[0]'s version has been bumped to 0.2.1. You can find both the new version of dispatch and webmachine on OPAM.
Full but short release notes can be found here:
As always, issues and pull requests welcomed.
-Spiros E.