14%
MIT
neglectedBuckleScript bindings to the Director router

bs-director

BuckleScript bindings to the Director router.

npm i bs-director

Usage

  • RE
  • ML
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 "/";
967: syntax error, consider adding a `;' before