Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 829 Bytes

README.md

File metadata and controls

26 lines (19 loc) · 829 Bytes

[UNMAINTAINED] bs-director

BuckleScript bindings to the Director router.

NOTE: This repository is unmaintained. If you'd like to maintain it, please either make an issue in the meta repository, or bring it up in Discord.

npm i bs-director

Usage

let router =
  DirectorRe.makeRouter({
    "/": () => Js.log("Navigated to tasks list"),
    "/active": () => Js.log("Navigated active tasks list"),
    "/profile/:userid": (userid: string) => Js.log("Navigated to profile for: " ++ userid),
    "/completed": () => Js.log("Completed a task")
  });

/* Optional configuration */
DirectorRe.configure(router, {"foo": "bar"});

DirectorRe.init(router, "/");