Fork me on GitHub

In 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?


Are you using cursive or emacs?


Earlier in section 2.2 you were supposed to (start) a server. That will listen on localhost:3000. Did you do that?


Also make sure your read the README in your project template.


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


I also tried the (in-ns ...)


Oh, I got it working now. Didn't know there were two REPLs in shadow-cljs. The second one appears after I connect to localhost:3000, but I already had the other REPL open earlier, so I missed that


sorry 🙂 and thanks again


you're welcome - good luck!