This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aleph (1)
- # beginners (192)
- # boot (9)
- # cider (12)
- # cljs-dev (223)
- # clojure (30)
- # clojure-brasil (3)
- # clojure-china (1)
- # clojure-italy (4)
- # clojure-russia (24)
- # clojure-spec (7)
- # clojured (5)
- # clojurescript (82)
- # cursive (9)
- # datomic (24)
- # emacs (6)
- # fulcro (9)
- # keechma (1)
- # luminus (1)
- # off-topic (3)
- # om-next (5)
- # onyx (1)
- # parinfer (9)
- # re-frame (1)
- # reitit (4)
- # ring-swagger (6)
- # shadow-cljs (8)
- # spacemacs (1)
- # sql (1)
- # unrepl (13)
Hi, I have a code organization/aesthetical problem. I have two files/namespaces:
defsc`` for the Person component) and
a.b.c.mutations``. A mutation
mutty`` has a remote part and after it executes, I need to reload the Person in question to see the changes server made. Follow 9.8.1. Load Actions in Mutations from the fulcro book, that’s done by
(load-action env ident Person)``, but that means the
a.b.c.mutations``` namespace must require the
a.b.c.person`` namespace to have access to
Person`` component. But also, to be able to use short name of the mutation
mutations/mutty`` in the
a.b.c.person`` namespace, I need to do
require [a.b.c.mutations :as mutations]`` in
a.b.c.person``. And that’s a circular dependency. Now, I understand that a mutation name is just a symbol and writing its full name
a.b.c.mutations/mutty`` works (and that’s what I am doing at this moment), but that extra
a.b.c`` (in my case somewhat longer) is quite ugly and keeps bugging me. Is there some way around this? Or should I just bite the bullet and write that extra few characters?
@tony.kay In fulcro-spec, when I use
=throws=>, I’m getting an error saying
throws? isn’t defined in my namespace. Fulcro-spec’s source emits a
throws? symbol when
=throws=> is used, but it doesn’t seem to be in any of the core clojure namespaces. Perhaps there’s a missing require in fulcro spec?
I have a
(defsc CompanyPage ...) that follows the example of the report router in the book and video.
It points to
[company/by-id db/id] has a key
If a mutation adds to company/offices everything works fine if the key is there.
But if the key is not there and the first office gets added the new entry and the key gets created fine in the client-db as shown by fulcro-inspect but the ui does not pick up the change. Navigating away and back shows the entry.
A work around is to have the server send an empty vector on initial load but this gets nasty as I add keys.
Do I tackle this with initial-state or refresh? I tried both.
@levitanong what versions of things? It should work, and in fact I've used that exact feature recently.
@magra follow-on read? See the
:refresh option of load. The other option is to use
:keyframe rendering mode