This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-30
Channels
- # beginners (32)
- # boot (15)
- # cljs-dev (200)
- # cljsjs (1)
- # cljsrn (18)
- # clojure (4)
- # clojure-austin (2)
- # clojure-spec (6)
- # clojure-uk (8)
- # clojurescript (69)
- # cloverage (1)
- # cursive (12)
- # datomic (1)
- # dirac (37)
- # emacs (1)
- # hoplon (38)
- # off-topic (3)
- # om (19)
- # om-next (1)
- # onyx (4)
- # parinfer (2)
- # perun (27)
- # protorepl (4)
- # re-frame (5)
- # rum (9)
- # spacemacs (8)
- # untangled (2)
Hey.. Now that I am more familiar with parser and query syntax, I am building an app with Datomic on the back-end. Concerning mutations. Is there any link / interop between om.next tempid and Datomic tempid? I receive :result {:tempids 鈥 from mutation, what should I do with it ( in terms of optimistic updates) ? Or should I just re-read my remote keys?
@arohner oh so your problem is with links?
(looking at your example now)
Links look closest to what I want to achieve, and would result in pretty clean code, if links triggered sends
I'll have to look at the issue you opened, but I think I know what's wrong with the example above
I think the path we were going down yesterday was messy and got too involved in Om internals
@arohner so one thing though is that links aren't really supposed to be sent to the server
which is why adding :foo/bar
to the top-level query effectively works for the case of your issue
and if client-side :foo/bar
returns {:remote true}
, that would be a send for :foo/bar
well it doesn't, really
Links are supposed to be used with db->tree
db->tree
will understand that a link refers to a top level prop in the app state when it sees one
I got the recursive read stuff to work eventually yesterday, but it seemed to get into the internals too much, and without links, it wouldn鈥檛 render properly
@arohner they're meant for different purposes. if you want to modify / extract stuff from the query you send to the remote, you can manipulate the AST