reasonml-community / bs-director

[UNMAINTAINED] BuckleScript bindings to the Director router

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[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, "/");

About

[UNMAINTAINED] BuckleScript bindings to the Director router


Languages

Language:OCaml 100.0%