This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-24
Channels
- # admin-announcements (1)
- # alda (22)
- # aws-lambda (1)
- # beginners (9)
- # boot (17)
- # cider (39)
- # cljs-dev (10)
- # cljsjs (1)
- # cljsrn (14)
- # clojure (88)
- # clojure-android (1)
- # clojure-dev (9)
- # clojure-india (1)
- # clojure-russia (271)
- # clojure-spec (5)
- # clojure-uk (101)
- # clojurescript (74)
- # clojutre (11)
- # component (2)
- # cursive (24)
- # datascript (7)
- # datomic (9)
- # dirac (13)
- # docs (3)
- # emacs (4)
- # garden (21)
- # hoplon (9)
- # jobs-rus (5)
- # lein-figwheel (3)
- # leiningen (13)
- # luminus (12)
- # off-topic (1)
- # om (24)
- # onyx (84)
- # proton (3)
- # re-frame (39)
- # reagent (21)
- # rethinkdb (1)
- # slack-help (10)
- # specter (4)
- # test-check (1)
- # untangled (35)
- # yada (2)
Does it make sense to have a component that exists only to have access to a common query (something that's used by some other components? I'm never going render the component directly. I feel like I'm Doing It Wrong™
@grzm: people have been doing that for normalization, yes
@anmonteiro In the statement "people have been doing that for normalization", are you a person?
I think I've done that once
I can't recall because I haven't touched that project in a while
@grzm: I can't say without a specific example
Do you have anything that you can share?
gotcha. I've got some bugs to work out right now, but I'll see if I can extract something useful to talk about later.
Cool thanks
@grzm we have a ns called domain
where we have put all queries that are relevant for the domain
of our application and then we have default components for this without a render function, this is very useful because there are many times you only want to get and normalize the data when you give it to a component without a query. We also put our ident functions there to reuse.
if that makes any sense
@mitchelkuijpers yeah, that does. I'm always surprising myself realizing that for the most part all of this stuff is just data that gets passed around. For example, It's not like something magical gets returned by om/get-query
: it's just that data structure that query
returns. Remembering I can do everything I would normally do with functions and data — just like you're suggesting — is always refreshing.
@grzm: that realization is probably the beginning of your enlightenment wrt. Om Next :-)
I've been trying to find the om/om next documentation on how to return data besides tempids from a mutation and am coming up empty. I'm sure I've seen it before, but I can't put my finger on it right now. Any pointers?
you could create a remote which takes a transaction and returns some data, possibly performing some side effects based on the transaction
Does anyone know if it would be a good or bad idea to use ref->components
as a check for whether cached entity data can be discarded (meaning there are no more components with a given Ident, so the data can discarded from app state)