This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-30
Channels
- # aws (1)
- # bangalore-clj (1)
- # beginners (73)
- # boot (13)
- # cider (3)
- # clara (19)
- # cljs-dev (33)
- # cljsrn (37)
- # clojure (177)
- # clojure-dev (13)
- # clojure-gamedev (1)
- # clojure-italy (10)
- # clojure-nlp (1)
- # clojure-russia (1)
- # clojure-spec (64)
- # clojure-uk (128)
- # clojurescript (177)
- # core-async (23)
- # cursive (5)
- # datascript (13)
- # datomic (20)
- # devops (49)
- # emacs (13)
- # graphql (5)
- # hoplon (13)
- # keechma (1)
- # leiningen (3)
- # liberator (4)
- # lumo (2)
- # off-topic (11)
- # om (19)
- # om-next (3)
- # onyx (6)
- # re-frame (13)
- # reagent (14)
- # ring-swagger (7)
- # rum (2)
- # spacemacs (7)
- # unrepl (1)
- # untangled (23)
- # vim (8)
- # yada (1)
In IntelliJ I can Cntl+B 'into' a function to see its code from where it is called. IIRC in one of Tony's video's he shows how 'going into' can be setup to work for mutations as well. Does anyone know how, or what video?? Thanks
@tony.kay I think you might have shared a good video property based testing a while back? If by chance you recall, can you please share again?
@currentoor the only testing video that comes to mind was the talk I gave at clj west.
well I just found this lol
thanks
@cjmurphy it is one of the Untangled in the Large, but here’s the trick: Use defmutation
to make your mutation. This macro sorta looks like a defn
. Then, in IntelliJ, click on the defmutation
itself and wait for the light bulb to appear (must not be in low power mode). Click on it. Choose “Resolve defmutation as…” and pick defn. Cursive will now recognize the symbols it “defines” as something that can be jumped to, and you can use syntax quoting to get the right namespace.
(ns some-long-ns)
(defmutation boo [params] ...)
(ns y (:require [some-long-ns :as s]))
(transact! this `[(s/boo)])
I’ve recently (in the new combo lib) added a server-side parser and more macros for making server-side reads and mutations (see the new GettingStarted.adoc, look for untangled-parser
). The latter looks just like the client defmutation, and therefore supports the same trick for the server.
surprising where the best gains are, eh? So far two of my favorite usability adds are defmutation
with that trick, and InitialAppState
Yes InitialAppState
more useful in practice than I thought it would be. Like when you have one-ofs it all composes well together.
well, it also enables really easy refactoring, since things just re-compose, and unions for UI concerns without hand-coding the graph.
I'm writing quite a complicated UI and there's very little 'involved' mucking around with the state. Different from when I remember picking up Om Next at first. load
is obviously a big deal too.
yeah, but load
is most of the story 😉 I was referring to “trivial” things that added a lot.
glad you like it. the latest alpha has a few bugs with server rendering on a browser, but I think Anthony is looking at those