Fork me on GitHub
#clojurescript
<
2018-03-25
>
stephenmhopper01:03:51

Hi everybody. I have a fairly simple question. I’m trying to set up a CLJS app with Rum, secretary + accountant, and Figwheel. My single page app resides at /resources/public/index.html so loading starts my app. I want to have url navigation with a # in the URL after the /index.html part. Are there any examples out there of how I can get this to work?

stephenmhopper01:03:32

I think I found it. Right now I’m doing this which seems to be working. If anyone has a better way, let me know:

(set! (.-onhashchange js/window)
  (fn [e]
    (secretary/dispatch! (.-hash js/window.location)) false))

(accountant/navigate! "#/")

benzap09:03:21

@stephenmhopper you can configure secretary for hashed urls (secretary/set-config! :prefix "#")

dnolen11:03:43

New page documenting how to contribute to Closure Compiler https://clojurescript.org/community/closure

dnolen11:03:07

for users who would like to see JS module processing development move a bit faster and want to help with that process

👍 4
jlmr11:03:54

Hi, I'm trying to use a npm module (`react-table`), but I'm getting the following error: Uncaught TypeError: Cannot read property 'array' of undefined at propTypes.js:3. Right now I have the following: project.clj

:install-deps true
     :npm-deps {:react "16.2.0"
                         :react-table "6.8.0"}
in my views.cljs file:
(:require [react-table]
                    [goog.object]))
(def rtable (goog.object/get react-table "default"))
Any help would be appreciated!