Fork me on GitHub
#om
<
2016-11-24
>
anmonteiro14:11:17

hah, just managed to get Om Next working with JS modules for React & ReactDOM with :advanced optimizations

danielstockton14:11:14

JS modules means dead code elimination?

anmonteiro14:11:25

dead code elimination in React, yes

anmonteiro14:11:48

means React and ReactDOM are not included as foreign libs anymore

anmonteiro14:11:58

but instead consumable via Google Closure

anmonteiro14:11:25

pushing my branch in a few if you're curious

danielstockton14:11:44

yeah, definitely, sounds exciting

anmonteiro15:11:18

so the "Components, Identity and Normalization" tutorial becomes 121KB gzipped

anmonteiro15:11:53

hrm actually not much gain there, it's 126KB gzipped with the current state of things

bbss15:11:21

Hmm, what reason could there be that the :action callback of mutate gets a different state then the mutate function?

(defmethod mutate 'app/expand-gist
  [{:keys [state]} _ {:keys [id]}]
  (print (get-in @state [:gist/id id :gist/expanded])) ;; => true
  {:action (fn []
             (print (get-in @state [:gist/id id :gist/expanded])) ;; => nil
             (swap! state update-in [:gist/id id :gist/expanded] not))})

bbss15:11:02

Hmm maybe the re-read overwrites in the merge function. That's probably it, because it worked earlier (before adding a re-read I think)

bbss15:11:17

Yep, doing deep-merge on the read with the state fixed it. Great!

danielstockton15:11:18

Just curious, why does om use both boot and lein?

anmonteiro15:11:25

because I like Boot better, and I prefer to run Om's tests in Boot

anmonteiro15:11:38

no special reason other than that

anmonteiro15:11:10

it allows to watch for file changes and automatically run the tests on save, which I don't know how to do with lein

anmonteiro15:11:16

David doesn't even use Lein, though

anmonteiro15:11:23

there's a pom.xml as well there 🙂

danielstockton15:11:57

does one need to be authoritative to push to clojars?

anmonteiro15:11:30

you need to be in the clojars group for the repository

danielstockton15:11:32

just wondering if one will be more reliable, for reference

danielstockton15:11:49

i know nothing about boot, i never experienced enough problems with lein to give it much chance

danielstockton15:11:59

maybe im missing out

danielstockton16:11:13

i noticed for example, you bumped the clojure dependency in boot but not in project.clj

anmonteiro16:11:03

doesn't matter

anmonteiro16:11:25

anyway, the Boot script isn't used to push to clojars

anmonteiro16:11:55

the Clojure dependency is declared as provided in any case, so downstream applications need to declare it

danielstockton16:11:25

just curious more than anything, in my projects i tend to be OCD and look for a definitive 'right' way, i'd be uneasy about mixing build tools and the headaches it could cause

danielstockton16:11:15

you clearly understand all that it entails much more than i do, my uneasy feeling probably comes from a narrow understanding of how everything fits together

anmonteiro16:11:37

@danielstockton the boot script is just there for convenience

anmonteiro16:11:43

Om will build the same if we delete it