# Routing SPAs in CLJS? Secretary's dead with cljs 1.10

**URL:** https://clojureverse.org/t/routing-spas-in-cljs-secretarys-dead-with-cljs-1-10/3158
**Category:** How to?
**Tags:** clojurescript
**Created:** [November 10, 2018, 3:10pm UTC](https://clojureverse.org/t/routing-spas-in-cljs-secretarys-dead-with-cljs-1-10/3158 "2018-11-10T15:10:57Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![Webdev\_Tory](https://clojureverse.org/user_avatar/clojureverse.org/webdev_tory/32/3781_2.png) [@Webdev\_Tory](https://clojureverse.org/u/Webdev_Tory)
#### Post date: [November 10, 2018, 3:10pm UTC](https://clojureverse.org/t/routing-spas-in-cljs-secretarys-dead-with-cljs-1-10/3158/1 "2018-11-10T15:10:57Z")

</div>

After hours of debugging I worked my way to this issue: [https://github.com/gf3/secretary/issues/100](https://github.com/gf3/secretary/issues/100) . It seems that Secretary is derelict and no longer maintained. WIth the latest clojurescripts, any `secretary/defroute` with destructuring fails (and might take you a long time to debug). I’d really like to avoid forking it; what other solutions are you using?

---

<div class="post-metadata">

### Author: ![thomascothran](https://clojureverse.org/user_avatar/clojureverse.org/thomascothran/32/1486_2.png) [@thomascothran](https://clojureverse.org/u/thomascothran)
#### Post date: [November 10, 2018, 7:27pm UTC](https://clojureverse.org/t/routing-spas-in-cljs-secretarys-dead-with-cljs-1-10/3158/2 "2018-11-10T19:27:00Z")

</div>

Metosin’s Reitit is really nice, and Metosin does a good job maintaining their libraries.

I really wish unmaintained libraries would have a clear warning in the readme. It’s a somewhat common experience for JS devs coming to ClojureScript to try out a library, work through the docs, only to run into bugs they finally realize are the result of the fact that the library is unmaintained. It gives new people the impression that the ClojureScript ecosystem is more unstable and unpredictable than it really is.

---

<div class="post-metadata">

### Author: ![pesterhazy](https://clojureverse.org/user_avatar/clojureverse.org/pesterhazy/32/395_2.png) [@pesterhazy](https://clojureverse.org/u/pesterhazy)
#### Post date: [November 10, 2018, 9:25pm UTC](https://clojureverse.org/t/routing-spas-in-cljs-secretarys-dead-with-cljs-1-10/3158/3 "2018-11-10T21:25:10Z")

</div>

The JavaScript router5 library (used in [cljs-spa-example](https://github.com/pesterhazy/cljs-spa-example)) works well with ClojureScript.

---

<div class="post-metadata">

### Author: ![royalaid](https://clojureverse.org/user_avatar/clojureverse.org/royalaid/32/668_2.png) [@royalaid](https://clojureverse.org/u/royalaid)
#### Post date: [November 10, 2018, 9:44pm UTC](https://clojureverse.org/t/routing-spas-in-cljs-secretarys-dead-with-cljs-1-10/3158/4 "2018-11-10T21:44:59Z")

</div>

I have been playing around with Bidi+pushy, seems to work well enough.

---

<div class="post-metadata">

### Author: ![borkdude](https://clojureverse.org/user_avatar/clojureverse.org/borkdude/32/306_2.png) [@borkdude](https://clojureverse.org/u/borkdude)
#### Post date: [November 10, 2018, 11:28pm UTC](https://clojureverse.org/t/routing-spas-in-cljs-secretarys-dead-with-cljs-1-10/3158/5 "2018-11-10T23:28:23Z")

</div>

For now you can use this version which is patched for the newest CLJS.

> <https://github.com/wagjo/secretary/commit/3064e81097236200ded3a63aa088a2847074a92c>

---

<div class="post-metadata">

### Author: ![simongray](https://clojureverse.org/user_avatar/clojureverse.org/simongray/32/246_2.png) [@simongray](https://clojureverse.org/u/simongray)
#### Post date: [November 11, 2018, 8:37am UTC](https://clojureverse.org/t/routing-spas-in-cljs-secretarys-dead-with-cljs-1-10/3158/6 "2018-11-11T08:37:21Z")

</div>

Thanks borkdude (for the heads-up and the link to the forked repo)!

Sure would be great to have more abandoned, yet popular projects like this transferred to new maintainers. There is some value in not having to needlessly refactor perfectly functional parts of one’s code base.

In my case, I use secretary + accountant because it was the easiest way to get routing and clickable links going in my SPA (literally a two-liner to get accountant working once you have the secretary routes set up).

---

<div class="post-metadata">

### Author: ![slipset](https://clojureverse.org/user_avatar/clojureverse.org/slipset/32/1127_2.png) [@slipset](https://clojureverse.org/u/slipset)
#### Post date: [November 11, 2018, 10:27am UTC](https://clojureverse.org/t/routing-spas-in-cljs-secretarys-dead-with-cljs-1-10/3158/7 "2018-11-11T10:27:19Z")

</div>

Letting the cat out of the bag.  
I’ve created [https://github.com/clj-commons](https://github.com/clj-commons) for this purpose, and `secretary` is its first project.  
I’ve wanted cli-commons for the longest time, mainly to provide a home for old, abandoned, done Clojure projects that still see use.

There are many things an org like clj-commons could concern itself with, but for now, its main focus is to maintain unmaintained libs.

So, secretary is available here: `https://github.com/clj-commons/secretary` and at clojars here [https://clojars.org/clj-commons/secretary](https://clojars.org/clj-commons/secretary)

Oh, and both PR’s, issues, and help is welcome 🙂

---

<div class="post-metadata">

### Author: ![slox](https://clojureverse.org/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@slox](https://clojureverse.org/u/slox)
#### Post date: [November 11, 2018, 12:03pm UTC](https://clojureverse.org/t/routing-spas-in-cljs-secretarys-dead-with-cljs-1-10/3158/8 "2018-11-11T12:03:59Z")

</div>

@slipset A repository transfer[0] may be more suitable than the forked repo.

[0] [https://help.github.com/articles/about-repository-transfers/](https://help.github.com/articles/about-repository-transfers/)

---

<div class="post-metadata">

### Author: ![timgilbert](https://clojureverse.org/user_avatar/clojureverse.org/timgilbert/32/666_2.png) [@timgilbert](https://clojureverse.org/u/timgilbert)
#### Post date: [November 12, 2018, 10:43pm UTC](https://clojureverse.org/t/routing-spas-in-cljs-secretarys-dead-with-cljs-1-10/3158/9 "2018-11-12T22:43:06Z")

</div>

> [@Webdev\_Tory](#):
>
> what other solutions are you using?

I really like sibiro, which just simple enough and works on both the JVM and JS sides of the house:

> **[GitHub - aroemers/sibiro: Simple bidirectional data-driven request routing...](https://github.com/aroemers/sibiro)**
>
> Simple bidirectional data-driven request routing for Clojure and ClojureScript - GitHub - aroemers/sibiro: Simple bidirectional data-driven request routing for Clojure and ClojureScript

If I was starting from scratch, I’d probably look at retit, which also ticks the boxes I need and has decent documentation that doesn’t give me a headache.

---

<div class="post-metadata">

### Author: ![borkdude](https://clojureverse.org/user_avatar/clojureverse.org/borkdude/32/306_2.png) [@borkdude](https://clojureverse.org/u/borkdude)
#### Post date: [November 13, 2018, 8:59pm UTC](https://clojureverse.org/t/routing-spas-in-cljs-secretarys-dead-with-cljs-1-10/3158/10 "2018-11-13T20:59:47Z")

</div>

the repo is now properly transferred: [https://github.com/clj-commons/secretary](https://github.com/clj-commons/secretary)

---

<div class="post-metadata">

### Author: ![dimovich](https://clojureverse.org/user_avatar/clojureverse.org/dimovich/32/1813_2.png) [@dimovich](https://clojureverse.org/u/dimovich)
#### Post date: [November 16, 2018, 8:23pm UTC](https://clojureverse.org/t/routing-spas-in-cljs-secretarys-dead-with-cljs-1-10/3158/11 "2018-11-16T20:23:49Z")

</div>

I’m also using [Reitit](https://github.com/metosin/reitit) with [Accountant](https://github.com/venantius/accountant). Works really nice.

---

<div class="post-metadata">

### Author: ![Webdev\_Tory](https://clojureverse.org/user_avatar/clojureverse.org/webdev_tory/32/3781_2.png) [@Webdev\_Tory](https://clojureverse.org/u/Webdev_Tory)
#### Post date: [November 16, 2018, 8:50pm UTC](https://clojureverse.org/t/routing-spas-in-cljs-secretarys-dead-with-cljs-1-10/3158/12 "2018-11-16T20:50:19Z")

</div>

I’ve switched over to Reitit, and used it as an opportunity to ditch the Accountant dependency since I don’t need Accountant to get rid of URL fragments anymore. What does Accountant still give you?

---

<div class="post-metadata">

### Author: ![dimovich](https://clojureverse.org/user_avatar/clojureverse.org/dimovich/32/1813_2.png) [@dimovich](https://clojureverse.org/u/dimovich)
#### Post date: [November 16, 2018, 11:09pm UTC](https://clojureverse.org/t/routing-spas-in-cljs-secretarys-dead-with-cljs-1-10/3158/13 "2018-11-16T23:09:40Z")

</div>

Using Accountant for handling browser history and URL clicks.

---

<div class="post-metadata">

### Author: ![Webdev\_Tory](https://clojureverse.org/user_avatar/clojureverse.org/webdev_tory/32/3781_2.png) [@Webdev\_Tory](https://clojureverse.org/u/Webdev_Tory)
#### Post date: [November 17, 2018, 5:49am UTC](https://clojureverse.org/t/routing-spas-in-cljs-secretarys-dead-with-cljs-1-10/3158/14 "2018-11-17T05:49:51Z")

</div>

Doesn’t Reitit handle both of those out-of-the-box?

---

<div class="post-metadata">

### Author: ![dimovich](https://clojureverse.org/user_avatar/clojureverse.org/dimovich/32/1813_2.png) [@dimovich](https://clojureverse.org/u/dimovich)
#### Post date: [November 17, 2018, 1:23pm UTC](https://clojureverse.org/t/routing-spas-in-cljs-secretarys-dead-with-cljs-1-10/3158/15 "2018-11-17T13:23:54Z")

</div>

Hm, didn’t know it provided that functionality. I wrote the code in the beginning of summer, so could be sth they added later. Thanks for the tip!

---

<div class="post-metadata">

### Author: ![system](https://clojureverse.org/uploads/default/original/2X/5/51079bf9e4b7d9466242c06cf1e43b9f8bd6da14.png) [@system](https://clojureverse.org/u/system)
#### Post date: [May 19, 2019, 1:23am UTC](https://clojureverse.org/t/routing-spas-in-cljs-secretarys-dead-with-cljs-1-10/3158/16 "2019-05-19T01:23:56Z")

</div>

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
