This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-16
Channels
- # atlanta-clojurians (1)
- # aws (1)
- # beginners (65)
- # boot (4)
- # cider (81)
- # cljs-dev (25)
- # cljsrn (27)
- # clojure (129)
- # clojure-dusseldorf (12)
- # clojure-italy (68)
- # clojure-norway (5)
- # clojure-poland (4)
- # clojure-spec (14)
- # clojure-uk (72)
- # clojurescript (144)
- # code-reviews (19)
- # copenhagen-clojurians (5)
- # cursive (16)
- # datomic (21)
- # editors (1)
- # emacs (15)
- # events (1)
- # figwheel (6)
- # fulcro (54)
- # graphql (1)
- # hoplon (24)
- # jobs (6)
- # jobs-discuss (2)
- # keechma (4)
- # leiningen (6)
- # luminus (17)
- # lumo (2)
- # off-topic (43)
- # onyx (6)
- # pedestal (2)
- # perun (2)
- # portkey (3)
- # re-frame (22)
- # reagent (11)
- # ring-swagger (5)
- # shadow-cljs (46)
- # specter (8)
- # test-check (2)
- # testing (3)
- # vim (16)
- # yada (1)
@wilkerlucio Fulcro Inspect sends nil
through in the props of components. This means that if you have assertions, such as that a particular scalar field is not nil, or anything else really, they will all be triggered when using Fulcro Inspect. Is this the way it is supposed to happen? Something that can't be helped?
@cjmurphy hello, not sure what you mean by sends nil
though in the props, you mean like scanning a map asserting that nothing is nil?
Yes - a particular thing inside the map that should always be there. I might be checking boolean? for instance.
how is that affecting you? you try to run (s/valid?)
and it breaks on spec keys?
but why are you validating the spec render calls thenselves, it's some global instrumentation?
but where? I'm trying to understand why are you hitting the inspect code in the process
or the keys
I didn't have Fulcro Inspect there but then wanted to use it, so put it in, then it triggered all my crude assert-style validation.
where is your assertion placed?
of the root?
what the assert looks like?
the-name
is a prop that has gone into a generic component. Without Fulcro Inspect all is fine.
I don't understand how that can be happening, because how a inspect prop is getting on your component?
sorry, still awaking here, I mean inspect š
It seems that Fulcro Inspect is running the root factory method - sticking the props in. I guess this is part of what Fulcro Inspect does.
can you please send the line you are looking in?
And essentially my asserts are checking that initial state is getting to all the places it is supposed to.
It seems you don't expect this behaviour. Can I just put an issue up showing code where the asserts are fired? It should be something quite simple.
ok, would be nice with an reproducing example, I'm still not really getting it
humm, wait, there is one place where we call your factory
and that is on the dom preview
anyway, open the issue so we can track there
Iāve just uploaded a video called āUnderstanding Fulcroā and added it to the watch list. Iām not sure exactly where it should goā¦I realized that a lot of people would probably benefit from an overall look at the core mechanism and design of Fulcro so they could more easily āget itā without having to completely learn it. Iād be interested in feedback, of course. It is hard for me to know if such videos are really helpful, since I know it so well. The target audience is any interested developer, so in that sense, I hope that it is comprehensible to anyone with very basic Clojure knowledge. https://youtu.be/nlT45ikSEOE
just finished watching it. thought it was excellent, a great addition to the collection š
Is there an api to query from outside of defsc
s? I want to have my non-fulcro code being able to do something based on state and to query fulcro-client, instead of passing state from defscās to that my non-fulcro code
@troglotit db->tree
, merge-component!
, transact!
can all be combined in external code. If youāve saved your client in an atom, then the :reconciler
is just in it at that key. You can use app-state
on the reconciler to get the state atomā¦and then running db->tree
on that will do it.
@tony.kay is there a version that supports legacy defui? So that I donāt need to refactor every component?
yeah itās here https://github.com/fulcrologic/fulcro/blob/e9e1c6eedd3169901f8a5e045b4a8958c68174c6/src/main/fulcro/client/primitives.cljc#L554
thatās in the latest version too
I still use defui
in some of the older parts of my codebase
defui
is just fully supportedā¦`defsc` is just cleaner with error checking. Sorry, I was encouraging you to port for reasons unrelated to necessity