This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-22
Channels
- # bangalore-clj (6)
- # beginners (110)
- # boot (49)
- # cider (13)
- # cljs-dev (35)
- # cljsrn (5)
- # clojure (145)
- # clojure-conj (3)
- # clojure-dev (60)
- # clojure-italy (2)
- # clojure-nl (3)
- # clojure-russia (3)
- # clojure-serbia (1)
- # clojure-spec (116)
- # clojure-uk (58)
- # clojurescript (235)
- # cursive (14)
- # datascript (7)
- # datomic (31)
- # dirac (144)
- # emacs (1)
- # events (1)
- # hoplon (12)
- # leiningen (11)
- # luminus (60)
- # lumo (19)
- # off-topic (18)
- # om (74)
- # onyx (5)
- # pedestal (13)
- # precept (3)
- # re-frame (3)
- # reagent (15)
- # remote-jobs (7)
- # ring-swagger (25)
- # rum (1)
- # untangled (53)
- # vim (3)
Just playing with app.basic-ui
. My understanding is that the same keyword is sometimes used as an edge, and sometimes as the the id value in an ident - for instance the keyword :friends
(and :enemies
). Perhaps it would it make understanding easier if there's some differentiation, so two different keywords used, for example: :friend-edge
and :friend-id
?
cjmurphy: I agree some clarity would be helpful. The biggest problem is collisions. Thus the recommendation (that I sometimes ignore) that things be namespaced.
The edge vs. table. Tables do typically have /by-id
or something, which makes them obvious. I worry more about a load
that overwrites a root-level edge.
@eric.shao contributions welcome. I don’t personally need react native, so I don’t have a lot of motivation…unless you want to fund such an effort 😉
@claudiu I didn’t realize merge alt unions it didn’t work on the server. You can open an issue. The server-side rendering could use some love. It is low on my personal priority list, but I’d be glad for help cleaning it up. The whole satisfies, implements, etc story between server and client is fun.
Ah great new, I'll keep an eye on that issue. We've disabled pathopt before to try and avoid problems with our query struture but for our app the performance hit was too high.
@gardnervickers Oh! that’s great news
stay on the older version for now, as long as it is working for you. I assume you’ve moved transacts towards the root as a workaround for the errors
I was trying to reproduce the issue yesterday but I didn't make much progress.
BTW: I’m in a Starbucks in the middle of Montana at the moment on a road trip. Need to head out soon.
Ah nice enjoy!
@wilkerlucio Hm. Did you resolve that?
@tony.kay: I was able to get around it, it seems something odd is going when the root component requires only keys not present on the data, my fix was to add a :ui/react-key
at my initial state, so it always have at least this one present, I might have some time to look on it later and try to pinpoint more exactly whats going on
I have seen cases where an empty db causes db->tree
to not return data for a node. Never heard of that causing problems for root, but I guess if your query gives back nothing, then shouldComponentUpdate might prevent a render? But not an initial render 😕
cjmurphy: I agree some clarity would be helpful. The biggest problem is collisions. Thus the recommendation (that I sometimes ignore) that things be namespaced.
The edge vs. table. Tables do typically have /by-id
or something, which makes them obvious. I worry more about a load
that overwrites a root-level edge.
Not so much edge/join verses table, but edge/join verses what goes into the second place of an ident. In your example :friends
was used as both.
let me think on that some. Perhaps a careful naming update on that guide would be good. Perhaps even doing something silly like starting every ident table name with TABLE.
😄 I knew he was :the-one
!
If you’re looking at an app state, idents make it obvious what is a join. In a component, the query makes it obvious. Not seeing the need for a naming convention in general on those
Not so much a convention I was thinking, just to help people when they see :friends
used in many different ways for the example.
move the root-level props “out of the way” so to speak…then all that’s left is tables.
@tony.kay 'The whole satisfies, implements, etc story between server and client is fun.' Is there anywhere where I can find this working, or how should I go about solving this ?
ok 🙂 will try to see if I can get it working. Got a bit stuck on that one since I was expecting it to work 🙂
So :root/prop-name
means it is an edge used on the root component? Just :friends
the id part of the ident. I supposes there is no ns used for :friends
, so its available...
unless a load loaded something there without that prefix, but I generally :target
loads so I can use something convenient for the server naming in the load query.
[:person-list/by-id :friends]
[:person-list/by-id :enemies]
was how I understood it. So here these keyswords are not tables, not joins/edges, they are ids.
right, and if the root edges were like :root/friends
it would be clear, since there wouldn’t be a name collision
@tony.kay Will add a issue and in the meantime try to see if I can find a fix. Really slow progress (wedding in 2 months is killing my free time & I'm new to clojure). But would love to help out with untangled if I can. Thank you 🙂
yeah, and I’m trying to solve the other issues I’ve been wanting to help ppl with: stomping on root props/edges with loads, and making the app state a little easier to read from root.