This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-11
Channels
- # aws (2)
- # beginners (38)
- # boot (21)
- # boot-dev (8)
- # cider (51)
- # cljsrn (3)
- # clojars (23)
- # clojure (99)
- # clojure-austin (7)
- # clojure-brasil (1)
- # clojure-dev (8)
- # clojure-dusseldorf (1)
- # clojure-estonia (20)
- # clojure-greece (4)
- # clojure-italy (3)
- # clojure-russia (1)
- # clojure-spec (28)
- # clojure-uk (47)
- # clojurescript (47)
- # core-logic (3)
- # cursive (9)
- # data-science (1)
- # datomic (50)
- # docs (12)
- # emacs (5)
- # fulcro (60)
- # graphql (33)
- # hoplon (8)
- # jobs-discuss (1)
- # keechma (31)
- # lein-figwheel (10)
- # leiningen (4)
- # off-topic (70)
- # om (1)
- # onyx (15)
- # pedestal (5)
- # re-frame (185)
- # reagent (14)
- # remote-jobs (8)
- # ring-swagger (7)
- # rum (17)
- # shadow-cljs (193)
- # specter (6)
- # sql (51)
- # unrepl (8)
how do you show docs for a symbol (like you do for defcard-fulcro in your second video tutorial) in cursive/intellij?
omg I just found it
oh, cool... ok, I hadn't found shift-k and that works well.
I use ideavim so right on.
I really don't know how you were able to create so much supporting information for fulcro.
I have absolutely no excuse for not succeeding with this framework.
I think it still sucks 😜 But at some point you have to say “good enough” and get other stuff done
ah ok... well, it's kinda mindblowing... like video tutorials? check. maybe you prefer a github readme... check. or a book? check. and so on and so on.
yeah, videos are great.
at the same time, I feel like I need to improve my own skill at reading docs.
with text docs, I tend to go down rabbit holes of my own finding.
videos are like park rides... you have to keep moving along.
I'll work on it. ;-D
Hi all, is it possible somehow to inherit/share code between defsc
components? Let’s say I have one complex entity with a lot of fields and I need two different ways of displaying it. If I create two independent defsc
components, there’s going to be a lot of code duplication: args
if I use destructuring, query
, ident
, initial-state
, that’s going to be the same. The only difference is going to be the render code. Can I somehow avoid the code duplication? The only partial solution I see is to do (prim/get-query TheOtherVariant)
in one of the variants, but that feels ugly and I think it can not be used to share args
destructuring…
You can use regular vars or functions for the query
, ident
, initial-state
. It's not really inheritance but probably the easiest solution
@johnny Yes, that’s what I meant, but that does not help with tens of fields I have to list in args destructuring.
@bbktsk so, it shounds like you're wanting to render the same entity, but with different viewpoints?
how about this: write it once, and use a computed prop through a factory to choose the UI?
(defsc Person [this {:keys [person/name person/age person/spouse] :as props} {:keys [renderer] :as computed]
...
(case renderer
:view (render-person-view name age)
:detail (render-person-detail props)
...))
(defn ui-person-view [props] ((prim/factory Person) (prim/computed {:renderer :view})))
(defn ui-person-detail [props] ((prim/factory Person) (prim/computed {:renderer :detail})))
If you need to use other computed data, of course you'll have to read/write that to propagate it in the factory
Well, still need to repeast destructuring for args, but apart from that its pretty elegant.
I've been trying out fulcro-sql to see if it fits my use-case. But I've found a few issues with it. Do you accept pullrequests on that repo, because in the process of debugging I manage to fix said issues.
Can't promise that 😛 English isn't my first language and not a great writer to begin with
no expectations 🙂 Just if you noticed anything technical. For a while it had an old way of making the components that didn't even work anymore.
There is also one glaring missing feature: queries of data on join tables. I know what I want to do for that, but won't be allocating time to do it anytime soon.
so, if you end up with time and need it, I'd be glad to sketch out what I'm thinking would work, and help someone understand how to put it into place
What I could use aswell, is some kind of post processing of attributes after it's fetched from the database
yes, that is the other one: data coercion...had a discussion with someone on that recently...who was it???
so yeah, more knobs are needed for sure, and I'm happy to get PRs to add them. For new features, I'd want to collaborate on them....so let me know when/if you have time
For data coercion a simple item in schema ::core/coercion. With key attribute and simple coercion function, might suffice