bs-director
v0.0.6
Published
BuckleScript bindings to the Director router
Downloads
10
Readme
bs-director
BuckleScript bindings to the Director router.
npm i bs-director
Usage
let router =
DirectorRe.makeRouter {
"/": fun () => Js.log "Navigated to tasks list",
"/active": fun () => Js.log "Navigated active tasks list",
"/profile/:userid": fun (userid: string) => Js.log ("Navigated to profile for: " ^ userid)
"/completed": fun () => Js.log "Completed a task",
};
/* Optional configuration */
DirectorRe.configure router {"foo": "bar"};
DirectorRe.init router "/";