A client-side router for ClojureScript with familiar syntax and flexible parameter handling.
Secretary is a client-side router for ClojureScript that enables developers to define routes, match URI fragments, and dispatch corresponding actions in single-page applications. It solves the problem of managing navigation and state changes by providing a declarative routing system with familiar syntax from web frameworks like Sinatra or Rails.
ClojureScript developers building single-page applications who need a lightweight, flexible routing solution without the overhead of a full framework.
Developers choose Secretary for its simplicity, familiar routing syntax, and seamless integration with ClojureScript. It offers protocol extensibility for custom routing needs and avoids imposing a specific application architecture.
A client-side router for ClojureScript.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses Sinatra/Rails-like string patterns with :param and wildcards, making it intuitive for developers from those backgrounds, as shown in the route matcher examples.
Provides macros like defroute for easy route definition and parameter destructuring into native maps or vectors, streamlining SPA development.
Allows custom route rendering and matching via IRenderRoute and IRouteMatches protocols, offering flexibility for advanced use cases beyond built-in features.
Doesn't impose an application architecture, giving developers full control over how routing integrates with their ClojureScript workflows, as emphasized in the philosophy.
The :prefix option for hash routing breaks standard URI syntax by placing the fragment before the query, as warned in the README, which can cause interoperability issues.
Lacks built-in support for nested routes, middleware, or code splitting, forcing developers to implement these manually compared to more comprehensive routers.
Tied exclusively to the ClojureScript ecosystem, making it unsuitable for mixed JavaScript projects or those using other frontend frameworks.