This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-28
Channels
- # 100-days-of-code (10)
- # announcements (2)
- # architecture (16)
- # beginners (51)
- # bitcoin (3)
- # calva (1)
- # cider (6)
- # cljdoc (8)
- # cljs-dev (14)
- # cljsrn (4)
- # clojure (59)
- # clojure-italy (26)
- # clojure-losangeles (1)
- # clojure-nl (13)
- # clojure-spec (54)
- # clojure-uk (81)
- # clojurebridge (4)
- # clojurescript (20)
- # core-async (16)
- # cursive (39)
- # datomic (27)
- # emacs (12)
- # events (1)
- # figwheel-main (20)
- # fulcro (35)
- # funcool (1)
- # graphql (9)
- # hyperfiddle (10)
- # jobs (1)
- # jobs-discuss (7)
- # keechma (10)
- # lumo (22)
- # nrepl (18)
- # off-topic (28)
- # onyx (3)
- # pedestal (4)
- # re-frame (8)
- # reagent (8)
- # ring (4)
- # rum (3)
- # shadow-cljs (29)
- # testing (5)
Hi for cljsjs
packaging, which is the recommended syntax? (deps-cljsjs :provides...)
or (deps-cljsjs :foreign-libs [{:provides...}])
At least in https://github.com/cljsjs/boot-cljsjs/blob/master/src/cljsjs/boot_cljsjs/packaging.clj#L181 it implies the first syntax is legacy syntax. But the documentation here is different: https://github.com/cljsjs/packages/wiki/Npm-style-names-and-global-exports
Hey! Do any of you have a "listen to pushState" tutorial by any chance saved somewhere? Would love a link. Examples I've tried thus far lead to no avail.
@im Off the top of my head, you could look at implementations of pushy and accountant. They are very limited in scope and not too hard to read. https://github.com/kibu-australia/pushy https://github.com/venantius/accountant
Does anyone know about a 2d vector math lib for clojurescript. There are many js ones but all of them do the state mutation dance
Hi! Consider this code that I have, which fires login-action on click, how can I get a hold of the email and password within login-action?
I figured it out! I simply :onChange #(set-email %)
and then (defn set-email [event] (js/console.log (-> event .-target .-value)))
is there a standard way of creating a commonjs module from a cljs namespace using cljs.main
?
hi, a basic question - i'm getting an error when trying to require hiccup in a cljs file and then doing lein figwheel
: No such namespace: hiccup.core, could not locate hiccup/core.cljs, hiccup/core.cljc, or JavaScript source providing "hiccup.core"
- is there any way around this? i am very new to cljs so think i'm just missing something basic on how to use clj libraries in cljs.
@atmalagon are you using deps.edn
or lein
?
ah yes, good point; i've got [hiccup "1.0.5"] in my :dependencies and ran lein deps
before doing lein figwheel
, and if i try requiring hiccup in a lein repl, everything seems to import without error
As far as i know hiccup provides some macros. You might need to :require-macros for some hiccup functionality with cljs. Clj doesn't need to require macros explicitely
hiccup is a clojure library and can not be used from clojurescript - there is a hiccup/core.clj but no hiccup/core.cljs
@atmalagon a clojurescript alternative is goog.dom in the google closure library for generating html. If you are using react, there is https://github.com/r0man/sablono, uses hiccup style data and react to render html from clojurescript. Reagent also uses hiccup style data and react.
https://github.com/jeluard/hipo is also pretty nice ( plain html with reconciliation!) (@atmalagon)
https://github.com/jeluard/hipo is also pretty nice ( plain html with reconciliation!) (@atmalagon)