This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-25
Channels
- # aws (2)
- # beginners (57)
- # boot (31)
- # carry (15)
- # cider (9)
- # cljs-dev (9)
- # cljs-experience (32)
- # cljsrn (94)
- # clojure (129)
- # clojure-dusseldorf (3)
- # clojure-greece (4)
- # clojure-italy (8)
- # clojure-norway (3)
- # clojure-russia (344)
- # clojure-sg (39)
- # clojure-spec (2)
- # clojure-uk (39)
- # clojurescript (84)
- # core-async (99)
- # cursive (10)
- # data-science (1)
- # datascript (4)
- # datomic (66)
- # emacs (10)
- # graphql (4)
- # hoplon (28)
- # jobs (15)
- # luminus (3)
- # lumo (5)
- # off-topic (23)
- # om (4)
- # onyx (32)
- # pedestal (24)
- # re-frame (2)
- # reagent (7)
- # ring-swagger (32)
- # spacemacs (4)
- # untangled (57)
- # utah-clojurians (1)
In development mode and simple optimisations when i do (pr-str Component)
I get a string namespace/Component
but with advanced optimisations I get #object[$U "function (){React.Component.apply(this,arguments);this.state=null!=
.
As a simple test #?(:cljs (js/console.log (prn-str Root) (pr-str Root)))
seems to work on dev, simple but not for advanced compilation
ah, from an earlier message. I see. You’re saying that the generated CSS classnames are getting messed with during advanced compilation
That is probably a bug with om-css. There is probably some other method of getting the component name that doesn’t work the same when adv compilation is used.
In advanced compilation the artifacts are going to be renamed and minified. But I would not expect this to break anything.
(defui Component
Object
(render [this]
(dom/div nil "test")))
(js/console.log (prn-str Component) "" (pr-str Component))
on clojurescript slack someone suggested that it might be related to this issue: https://dev.clojure.org/jira/browse/CLJS-1249
the function in question is https://github.com/untangled-web/om-css/blob/master/src/om_css/core.cljc#L22
we just need to figure out what the “right way” is to get that string…it is prob not pr-str
yes 🙂 untangled/om-css is exactly what I was looking for, and the new pull request seems really nice.
Does anyone know of a good tutorial on creating “switcher” components via union queries that isn’t based on Untangled?
The bit that’s tripping me up is figuring out which parts of the behavior are coming from the untangled-specific initial state stuff
@claudiu So, it looks like if we use the React displayName that will survive advanced compile…I’m trying it now
Ah, so it’s not expected that the default db->tree would be able to resolve something like this?
Yeah. I’m inheriting some non-untangled code and figuring out what’s salvageable
And trying to figure out why we didn’t just use untangled 😛
Will take a look. Thanks!
tony.kay: my guess would be that people take some time to realize that Om.next by itself is very bare bones, adding Untangled creates more layers than people are used to, maybe we should make a survey, hehe
Yeah, I’m thinking the pitch should be something that helps people understand that. I think people see Untangled as something completely different, as opposed to something that makes Om Next easier
@tony.kay was merge-alternate-union-elements! the helper in question?
I don’t remember why, but there are CSS tests for augmenting via a defrecord…not sure those will work right in advanced…but not sure why they even exist
I think I was thinking you might want to make namespaced CSS without defui (use defrecord instead)
I’m going to play with that and see if it still works, but the new version should fix your problem