This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-06
Channels
- # beginners (95)
- # boot (3)
- # cider (13)
- # cljs-dev (9)
- # cljsjs (1)
- # cljsrn (35)
- # clojure (78)
- # clojure-dev (5)
- # clojure-italy (6)
- # clojure-nl (9)
- # clojure-russia (13)
- # clojure-spec (1)
- # clojure-uk (74)
- # clojurescript (59)
- # community-development (6)
- # core-async (41)
- # css (110)
- # data-science (2)
- # datomic (22)
- # defnpodcast (1)
- # devcards (1)
- # docs (1)
- # editors (6)
- # emacs (51)
- # figwheel (1)
- # fulcro (66)
- # jobs (1)
- # jobs-discuss (75)
- # lumo (51)
- # mount (2)
- # off-topic (33)
- # pedestal (24)
- # proton (3)
- # re-frame (29)
- # reagent (92)
- # reitit (16)
- # shadow-cljs (16)
- # spacemacs (4)
- # specter (6)
- # vim (6)
- # yada (7)
@tony.kay question, I'm using the mutation query feature, but one thing is tricking me, I set the component to be used on the return, but I have situations of success and failure (mutation might fail by bad data, internal network error, etc...), the success case works very fine, but on the error case it seems like the integrate ident is failing
when there is the error, I don't have the ident value (it gets nil, because the response map contains only the error), that ident with nil value is correctly added to the database
but the reference is not placed where it should be
so, the failed ref looks like [:some-return-ident nil]
, but it's assigned as just nil
on the target
is this behaviour expected?
I'm just trying to clarify before I jump in on debug, just hoping you might have an idea solution 🙂
returning hooks up a merge for that shape of data. If something causes you to not get that data, then there isn’t much to merge 🙂
the query of my component contains the error fields in question
and this is been correctly read and assigned to DB
just the ref is not
can't it just normalize as [:bla nil]
?
I don't understand why the nil
is not a valid thing here
it is everywhere else
oh, you’re saying that the integration of the ident is failing, but the normalization is otherwise fine?
can be a bug, just trying to clarify if there is a reasoning behind it
Has anybody else gotten this warning when they run the lein template generated project with shadow-cljs?
------ WARNING #1 --------------------------------------------------------------
File: fulcro/client/dom.cljs:66:1
--------------------------------------------------------------------------------
63 | (real-factory p)))
64 | (apply real-factory props children))))))
65 |
66 | (dom/gen-react-dom-fns)
-------^------------------------------------------------------------------------
Use of undeclared Var fulcro.util/force-children
--------------------------------------------------------------------------------
67 |
68 | (defn render
69 | "Equivalent to React.render"
70 | [component el]
--------------------------------------------------------------------------------
Circular dependency detected fulcro_css.core -> fulcro.client.primitives -> fulcro_css.css -> fulcro.client.primitives
@cjmurphy I had this when I accidentatlly included fulcro-css somewhere
Thanks @mitchelkuijpers I don't have that. In fact just putting Fulcro into this project for the first time. Only thing I can think of that may be dragging in Fulcro CSS is Fulcro Inspect. (And only a slight chance there as tools normally don't dictate dependencies - mark everything as provided - and when I last looked that was pretty much the case with Fulcro Inspect - hmm - but maybe it needs/likes to use the latest CSS stuff when the tool pops up, no matter what old Fulcro CSS you are using).
@cjmurphy fulcro-inspect definately dragges it in.. are you using leiningen?
if you add this to your defproject
:exclusions [fulcrologic/fulcro-css]
this will exlude it everywhere
No it doesn't because it has been added to fulcro
It has been added since 2.4.0: IMPORTANT CHANGE: Integrated Fulcro CSS. You should remove fulcrologic/fulcro-css from your dependencies, and exclude it from any libraries that bring it in.
Yes it will just add the exclude to every dep because you never want to drag in fulcro-css
Thanks @mitchelkuijpers Nice trick to know about, and I'm now past those circular deps errors.
I thought lein new fulcro myapp
made a new fulcro project with phantom-clj
@cjmurphy @mitchelkuijpers the yesterday release of fulcro-inspect
bumped fulcro and removed the fulcro-css
dep, so you can just bump that and it should work
Using fulcro.client.alpha.dom
, what is the recommended way to put two or more classes on a div? Something like (dom/div :.red :.shadowed "I have two classes")
generates a clojure.spec error.
@grant you need to "glue" then, as: (dom/div :.red.shadowed "I have tow classes")
And if you want to give something both a class and an id, you just have to put the id in the passed map? (dom/div :.class {:id "my-id"} "content")
instead of something like (dom/div :.class :#my-id "content")
?
here’s http://book.fulcrologic.com/#AlphaDOM the new api
Is there already some kind of macro to consume React components just like new fulcro.client.alpha.dom
? without converting to js, nils, etc?
Ah, cool. @wilkerlucio, @troglotit, thanks for the help.
spec is: (tag [kw] [props] [children])
(where brackets indicate optional, but order is required)
though technically (div nil (p nil "hello"))
or (div {} (p {} "hello")
may be slightly faster at runtime than (dom (p "hello"))
because the latter forces props detection at runtime instead of compile time
Fulcro 2.5.0-beta1 is on clojars. I’ve also updated the lein template to generate correct projects (I hope…did lots of testing).