This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-23
Channels
- # 100-days-of-code (1)
- # adventofcode (13)
- # aleph (1)
- # beginners (48)
- # boot (10)
- # calva (52)
- # cider (18)
- # cljsrn (23)
- # clojure (68)
- # clojure-uk (9)
- # clojurescript (5)
- # cursive (3)
- # datomic (4)
- # figwheel (7)
- # fulcro (14)
- # hoplon (2)
- # leiningen (5)
- # lumo (3)
- # off-topic (87)
- # overtone (5)
- # reitit (5)
- # rum (8)
- # shadow-cljs (7)
- # spacemacs (15)
In http://book.fulcrologic.com/#_step_1_the_initial_state it says that I can pull stuff from the REPL: dev:cljs.user=> (fulcro.client.primitives/get-initial-state fulcro-tidsrapport.ui.root/Root {}). However, I'm not sure how to access this. I have one REPL in the browser via shadow-cljs, where i started the server. But it doesn't work there. I get "CompilerException java.lang.RuntimeException: No such var: fulcro-tidsrapport.ui.root/Root". I also connected to the one I saw in the terminal "shadow-cljs - nREPL server started on port 9000", but it didn't work there either. Is there a REPL running on the client localhost:3000 that I can (should?) connect to somehow?
Earlier in section 2.2 you were supposed to (start) a server. That will listen on localhost:3000. Did you do that?
Were you able to successfully connect to localhost:9630 after starting the shadow-cljs as described in 2.2.1? The builds menu should show if main is compiling and being watched. If not, select it. Once you're able to start the server and load the page on port 3000, you should be able to connect to the browser repl.
you might have to do lein repl to get a clojure repl and something else for a clojurescript repl
I'm using emacs cider so I create both repls via cider-jack-in-clj&cljs other people here should be able to help you with cursive.
Also, looking at your error it may be that you are not in fulcro-tidsrapport.ui.root namespace. You could do (in-ns fulcro-tidsrapport.ui.root) first then it should find the Root. Or you could (require '[fulcro-tidsrapport.ui.root as root]) then you can run (fulcro.client.primitives/get-initial-state root/Root {})
I am using Cursive. Yes i did the (start), was able to connect to localhost:9630, and have compiled the main build. And I can also see the website on localhost:3000.
Do I connect to the browser REPL on localhost:3000? When I try, it just waits, unlike when I connect to 9000, which was started together with shadow-cljs