This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-14
Channels
- # aleph (2)
- # atlanta-clojurians (5)
- # beginners (38)
- # boot (2)
- # bristol-clojurians (1)
- # cider (31)
- # clara (8)
- # cljs-dev (136)
- # cljsrn (4)
- # clojure (86)
- # clojure-china (1)
- # clojure-greece (1)
- # clojure-italy (24)
- # clojure-nl (1)
- # clojure-spec (21)
- # clojure-uk (19)
- # clojurescript (68)
- # community-development (28)
- # core-async (35)
- # core-logic (4)
- # cursive (1)
- # data-science (1)
- # datascript (1)
- # datomic (46)
- # events (1)
- # figwheel (6)
- # fulcro (11)
- # graphql (3)
- # hoplon (1)
- # jobs (6)
- # jobs-discuss (94)
- # keechma (3)
- # luminus (4)
- # lumo (7)
- # mount (6)
- # off-topic (24)
- # onyx (6)
- # parinfer (31)
- # portkey (3)
- # programming-beginners (16)
- # re-frame (20)
- # reagent (69)
- # remote-jobs (4)
- # ring-swagger (25)
- # schema (1)
- # shadow-cljs (151)
- # spacemacs (2)
- # sql (14)
- # tools-deps (16)
- # uncomplicate (5)
- # unrepl (35)
- # vim (1)
- # yada (72)
@magra I guess if (:company/_offices params)
is not returning nil
, but an id for an ident, then you are fine. I was surprised to see Datomic underscore syntax being used on the client.
That seems fair enough if there was nil in the field in the first place. fnil
to conjure something up. I guess the alternative would be for that field to be []
from initial-app-state, or state created on initial-load. But I'm guessing you want the most dynamic/flexible way which is what you've done with fnil
.
Just pushed 2.4.0-SNAPSHOT again. It turns out that the DOM functions from Om Next are broken with respect to inline optimizations. They’ve been broken since the addition of server-side rendering. They “work”, which is why no one noticed, but never general inlined code via macros. The only way to fix this is to add a namespace. So, when I release the new DOM “for real” there will be a small amount of porting required if-and-only-if you use CLJC for your UI.
The trick for isomorphic is (in a cljc file):
(ns app
(:require #?(:clj [fulcro.client.alpha.dom-server :as dom] :cljs [fulcro.client.alpha.dom :as dom])))
...
That allows for: - Macro inline expansion in cljs, when you don’t use the dom elements as values (e.g. with higher-order functions) - Function versions (slower) in cljs when you use them in contexts where a function is required - Function versions for server-side rendering
I actually plan on releasing this new DOM work as fulcro.client.dom
after a relatively short period of verification, since it fixes what I see as an existing bug with optimization, and should be drop-in compatible with the public API (other than the conditional require in cljc, but since that’s the bug fix, it’s going to be necessary no matter what).