This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-13
Channels
- # announcements (3)
- # babashka (130)
- # beginners (73)
- # calva (22)
- # cider (46)
- # cljdoc (18)
- # cljs-dev (196)
- # cljsrn (18)
- # clojure (255)
- # clojure-europe (2)
- # clojure-finland (8)
- # clojure-gamedev (1)
- # clojure-germany (2)
- # clojure-losangeles (6)
- # clojure-nl (1)
- # clojure-spec (16)
- # clojure-uk (33)
- # clojurescript (32)
- # community-development (1)
- # conjure (40)
- # core-logic (11)
- # cursive (4)
- # datascript (8)
- # devcards (17)
- # emacs (21)
- # exercism (2)
- # fulcro (29)
- # funcool (15)
- # graalvm (18)
- # jobs (17)
- # jobs-rus (1)
- # lambdaisland (1)
- # lumo (1)
- # malli (19)
- # off-topic (15)
- # pathom (22)
- # quil (7)
- # re-frame (3)
- # reagent (3)
- # shadow-cljs (14)
- # spacemacs (41)
- # specter (2)
- # sql (5)
- # tree-sitter (1)
- # unrepl (16)
- # vscode (3)
- # xtdb (11)
- # yada (1)
for those people who are feeling adventurous - you can give the much improved JS bundler integration in master a spin https://github.com/clojure/clojurescript-site/blob/april-release-target-bundle/content/guides/webpack.adoc, feedback welcome
these changes are beneficial regardless of whether you use ClojureScript, Figwheel, Shadow etc.
It means you can publish ClojureScript libraries that depend on NPM, i.e idiomatic wrappers for cool libs / ui components etc.
It's also a path to migrate off CLJSJS which requires a lot of manual effort from the community to mirror popular packages
I'm guessing it'll massively reduce bundle sizes when used with many npm dependencies too. I hope to measure this soon.
@dnolen I made a ClojureVerse thread for visibility: https://clojureverse.org/t/test-drive-the-beta-clojurescript-js-bundler-integration-support/5779 - hope it’s ok
I have a shadow-cljs.edn file:
{:source-paths ["src/cljs" "src/cljc" "dev"]
:dependencies [[reagent "0.8.1"]
[re-frame "0.11.0"]
[cljs-http "0.1.46"]
[bidi "2.1.6"]
[clj-commons/pushy "0.3.10"]
[com.stuartsierra/component "0.4.0"]
[environ "1.1.0"]]
:dev-http {8080 "resources/public"}
:builds {:myapp {:target :browser
:output-dir "resources/public/js/compiled/out"
:asset-path "."
:modules {:main {:init-fn cljs.user/go}}
:devtools {:after-load myapp.system/reset}}}}
And notice, I'm compiling the js to that output-dir. However, upon going to localhost:8080 although the folder resources/public is served, the js/compiled/out files aren't in that folder, even though they exist locally. Why would that be?noob q: I'm just starting with cljs. I created a new project lein new re-frame mp +re-frisk
and I'm trying to get figwheel to work.
Interestingly enough, running lein figwheel
will show load empty page, if I edit anything and save, the open browser will automatically refreshes with content.
Does anyone have any idea why the initial page might be blank?
I’m new to frontend dev, having only done APIs and other backend work. For my first SPA what should I use as permanent storage?
@andrea
I'm puzzled. The instructions say to do lein dev
(not lein figwheel)
Are we talking about the same template? https://github.com/day8/re-frame-template#run-application
If so, it uses shadow-clj, not http://figwheel.It
@mikethompson thank you, I got into trouble following two separate tutorial thank you! Is shadow-clj an alternative (and incompatible with) figwheel? It looks like figwheel is mentioned in that page: https://github.com/day8/re-frame-template#hot-reloading-is-now-go
@andrea I've corrected that, thanks
shadow-clj and figwheel are alternatives
Hi guys, how do I get rid of the hashes in the Luminus project template during routing?
Looks like when you start the router, put :use-fragment false in the options https://metosin.github.io/reitit/frontend/browser.html
So this is my router: (def router (reitit/router [["/" {:name :home :view #'feed :controllers [{:start (fn [_] (rf/dispatch [:page/init-home]))}]}] ["/about" {:name :about :view #'about-page}]]))
and whenever I click on the button with the about link to it, I'm directed to localhost:3000/#/about instead of localhost:3000/about.
I have a re-frame subscription like so:
@(subscribe [:foo])
and in my subs.cljs, I have a subscription defined:
(reg-sub
:foo
(fn [db]))
But upon doing the subscribe, I getting the error:
core.cljs:3894 re-frame: no subscription handler registered for: :show-menu. Returning a nil subscription.
why would this be and how do I dissect this issue?Another question, I'm using :on-click in my reagent-reframe app to dispatch actions. However, the on-click events aren't triggered when tapped in my iPhone safari and presumably with all touchscreen devices. How can I fix this?
Try adding :on-touchstart click-handler
or changing the clickable element to a button or a tag. I recall touch events not firing clicks on divs without a touchstart handler. :on-touchstart identity
might work too.
@pshar10 is it this issue? https://github.com/day8/re-frame/blob/master/docs/App-Structure.md#theres-a-small-gotcha
@pshar10 you might want to ask your questions in the more specific #re-frame channel but be sure to read the docs first