Fork me on GitHub

@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.


@cjmurphy Did you write a tool that checks state sanity?


@cjmurphy default-db-format gave me a vector expected. And I sqashed the bug!


That's good to hear. It is so easy to do wrong things to your state.


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).