This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-11
Channels
- # announcements (14)
- # beginners (119)
- # boot (9)
- # calva (7)
- # cider (12)
- # cljdoc (2)
- # cljsrn (28)
- # clojure (127)
- # clojure-dev (2)
- # clojure-europe (3)
- # clojure-italy (2)
- # clojure-losangeles (9)
- # clojure-nl (6)
- # clojure-spec (15)
- # clojure-uk (39)
- # clojurescript (35)
- # community-development (4)
- # cursive (9)
- # datascript (8)
- # datomic (5)
- # duct (3)
- # emacs (10)
- # fulcro (45)
- # graphql (3)
- # jobs (1)
- # kaocha (8)
- # luminus (2)
- # off-topic (121)
- # onyx (3)
- # pathom (15)
- # pedestal (31)
- # planck (5)
- # reagent (25)
- # reitit (3)
- # remote-jobs (1)
- # shadow-cljs (48)
- # slack-help (1)
- # sql (142)
- # tools-deps (78)
@souenzzo have you looked at the mutations and network tab of the inspector?
could be that you’re getting duplicate data like Tony said (network tab), or duplication transactions invoked (transactions tab)
or non-duplicate transactions but poorly behaving ones
seems like it has to be of those three, and it would be good to figure out which one first
is the any way to provide :vendors
and other options(https://github.com/noprompt/garden/wiki/Compiler) to garden.core/css
when im using colocated css?
@mateusz.probachta https://github.com/fulcrologic/fulcro/blob/4dd64766032500eb25a3d535a76ab05a2b152447/src/main/fulcro_css/css.cljc#L66 doesn’t seem like it
I saw it but I had hope that I missed something. Any objection about possible pull request with this? I will need this so I prefer have this in fulcro than in my code:D. Is good idea to extend css related function by one extra arrity?
(defn css-something
([component])
([subset-of-garden-options component]))
?
is it good idea for first fulcro PR?Usually the codebase tends to keep the argument order the same, adding extra params at the end for option maps/etc.
Just a preliminary code review comment 🙂 I would appreciate a PR for sure, now that I’ve read about it. Thankfully we support modern browsers but the prefix support would be nice if we decided to support older ones as well. 👍
args order was inspired by garder/css
api. But usually i prefer adding extra options on the end. about browsers, clojurescript compile to es5 by default if i remember correctly so fulcro should support older browser. Prefixes in CSS are missing piece form me. My current project will be tested against IE and other older browsers so I'll catch all this kind of issues:D
@mateusz.probachta I’m working on a strategy to get this kind of stuff out of fulcro core. As it stands anything in the options map of defsc is hard to mess with…using protocols, so changes at that layer need new names or they are unacceptable breaking changes. As far as “helper” functions in the css namespace (e.g. for converting through garden), I don’t mind adding an extra arity for an “options” map if that makes sense. Also, why are we talking about the deprecated things in the old ns? Please don’t ask me to read a bunch of docs and source I wrote years ago to understand your request…
A clear pointer to a real function in current version with what you want to do will get a clear answer
@mateusz.probachta sorry that was snippy…just get a lot of requests and been busy lately
If you’re asking if you can add an arity to a normal function in css-injection to pass extra args to garden, the answer is yes, as long as it is a non-breaking change for existing users.
I keep trying to figure out what the wording is for this “implicit convention” we have for argument order…sort of like “you pass the things you have the least influence on first”…not sure that’s the right way to say it…but a db connection, or component, or something…typically “first”…
Same thing, but I usually think of it as “most stable” -> “least stable”. In most contexts, less -> more specific also works. The main point being, you want the stuff least likely to change first for partial application (which I seem to use way more often than most code I’ve seen, but that’s another discussion).
That’s a better way of saying it: what the implications are for use: in threading or partial application.
another general rule is “multi-arity functions preserve the order of the lesser arities”…you don’t switch arg order as it goes up
Hi, quick question one of my guys is trying to implement an autosave feature, for a form component that has a generic save mutation. we need the save func to check the form state etc, prior to firing the mutation. of course the issue is that is that if we say call setInterval during the component’s mount, we’re closing over component’s this
in the callback at the point that setTimeout is called, so when it actually executes, it’s not getting the current data. Any ideas on how we might circumvent this?
@U380J7PAQ this
gets stale?
also you could instead call a mutation with the reconciler (that should never change)
and in the mutation you can look up the data in app state
and use that
that will never be stale
does that make sense?
yeah that works for the data just fne, but we also were trying to check on the form state, etc with the apis
right, why can’t you do that in the mutation?
oh, which one?
those take in props, not this
This doesn’t sound right. I pass around functions that close over ‘this’ all the time without any issues.
^ i agree, i’ve never noticed it going stale
also, you can get the props in a mutation with prim/db->tree
and you can get the query from the component class with prim/classname->class
Are you setting the timer in :component-will-mount or :component-did-mount? You should be using the latter.