This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-18
Channels
- # aws (3)
- # beginners (18)
- # boot (3)
- # cider (47)
- # clara (54)
- # cljs-dev (62)
- # clojure (104)
- # clojure-berlin (1)
- # clojure-denver (1)
- # clojure-italy (1)
- # clojure-nl (22)
- # clojure-russia (30)
- # clojure-spec (28)
- # clojure-uk (95)
- # clojurescript (31)
- # cloverage (1)
- # cursive (1)
- # datomic (17)
- # duct (4)
- # emacs (27)
- # fulcro (36)
- # graphql (1)
- # hoplon (1)
- # jobs-discuss (1)
- # lein-figwheel (1)
- # lumo (2)
- # off-topic (44)
- # om-next (5)
- # onyx (29)
- # precept (1)
- # re-frame (8)
- # reagent (7)
- # ring (1)
- # ring-swagger (2)
- # schema (4)
- # shadow-cljs (185)
- # spacemacs (21)
- # specter (59)
- # tools-deps (7)
- # vim (15)
- # yada (1)
Does anyone have any experience inter-operating with JavaScript code that uses template strings? I'd like to use this lib from cljs: https://www.styled-components.com/docs/basics
You're going to have to look this up to double-check me, but I'm pretty sure that:
hello`there ${how} are ${you} today`
is equivalent to:
hello(["there ", " are ", " today"], how, you)
confirmed this works in js:
const color = "blue"
const ColorDiv = styled.div`color: ${color};`
const ColorDiv = styled.div(['color: ', ';'], color)
Has anyone set this up using lein-cljsbuild instead of build? https://clojurescript.org/guides/javascript-modules#node-modules more info in #lein-figwheel of the exact issue I’m hitting is
@danvingo @rgdelato template literals are part of es6 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
Hey guys,
Just recently created a macro namespace in clojurescript, and I’m now running into an issue when figwheel reloads…
FileNotFoundException: Could not locate <macro ns> on classpath
Anyone else run into this issue before? Everything works fine if i build via lein cljsbuild
but figwheel no longer works after adding the macro.
@danvingo I use styled-components
at my workplace and at the moment I’m trying to find something similar in cljs as well
I am just putting styles into style
attribute. But https://github.com/roman01la/cljss doesn't look bad.
https://clojurians.slack.com/files/U051V5LLP/FATG42LGN/styled-components.clj I was able to get styled-components working with a fulcro app. Just making sure you can call the styled-components from cljs. I'm working on writing a macro now (the code snippet has some thoughts on that) to replicate what the template literals expand into in JS, and deal with passing javascript objects to styled components but allowing client code to transparently pass cljs data structures for props.
trying to decide which library to use for css in my re-frame application. any recommendations anyone?
this is not a popular opinion here but...just use properly written SCSS. trying to cram every CSS/SCSS feature into some weird CLJ DSL isn't going to cut it
Is Garden popular for clj/cljs web apps? Seems like writing hiccup and clojure might make sense. https://github.com/noprompt/garden
Something like https://github.com/gajus/babel-plugin-react-css-modules would be nice... standard SCSS but scoped to individual components to save managing global cascades
@phil672 I also tried to keep using SCSS but having local names - linked to clj namespaces https://github.com/JoelSanchez/fqcss
the problem being, that it's slightly painful to write/read, specially in the clj part
I just write scss now.
Yeah that doesn't look as nice, because rather than writing regular classnames you have to write clj; it's not true SCSS.
yep, also editors go crazy trying to parse it
is it normal for lein figwheel
to take around 1 minute and 10 seconds to start up, every time?
@bravilogy No, not in general. If you can, do a thread dump to see where it is spending its time (presuming that most of it is spent in one big operation that is easy to catch).
@bravilogy jstack