Fork me on GitHub

After a 2 year break from working with clojurescript and Om, I'm looking to get back into it. Fulcro looks like a great fit, and I've been lurking in the channel for a bit so I gather that 2.0 is the way to go if I want to dive in. Before I do, does anyone know if the devguide working for 2.0?


@djjolicoeur No, start at 1.0. 2.0 is coming soon, but it won’t be appreciably different…just has some improvements.


2.0 should go into alpha in a month or so (maybe even a few weeks), but it won’t be ready probably till the end of the year for wider adoption


Dynamic query support is the main thing that is different, but you can build some pretty big things without ever needing that


@cjmurphy So, are you up and running now?


No I went back to 1.0. But I'll give it another go later on today. I guess hard to say what caused my issue with undefined calls stack trace. This time I might have a better outcome as I'll be a bit smarter about the process...


ok, thanks for trying. Like I said, it is working with todomvc, the demos, the dev guide, and such…so I expect it to work without significant issue


the instrument thing is definitely a no-no right now though


thanks @tony.kay, I'll stick with 1.0 for now


@tony.kay: Upgrading to 2.0 worked fine this time. For the searching and replacing I used some Clojure functions:


@tony.kay I'm playing with the defmutation macro, I like how with that cursive can detect the symbol definition, so we auto-complete on usages 🙂


but at same time, because the env param is at the inside functions, cursive doesn't understand and then can't bind the variables...


what about we move the env to the top? so the binding would be picked up, like this:


(defmutation my-mutation [env params]
  (action []


we could keep the current version working, so we don't break things, but also support this second one, so we don't love things like renaming (I do a lot of keyword renamting, those cases would not be currently contemplated)


@cjmurphy Are you saying that worked better, or that you were just bored and wanted to code it?


@wilkerlucio The problem with that is the docstrings…the docstrings would indicate the mutation was a function of two arguments then (and actually more seriously: would show usage errors when in transact because you wouldn’t even pass two parameters…in fact it would be an error to do so). But I agree, though, that it isn’t ideal that it doesn’t understand env as a result. It’s such a hard thing: macros end up making some things nicer, but hide other things that are already simple. In this particular case I felt it was much more useful to get the call-site to declaration navigation, docstrings, and code completion. If you want the bindings to work inside of the action, just wrap them in a destructuring in let:

(defmutation boo [p]
  (action [env] 
    (let [{:keys [state ...]} env]


that way the only thing that shows up as unknown is env itself


@tony.kay Yours didn't work for me out of the box: it completed but did not make any changes. And I wanted to be able to reverse changes and exclude a directory. And I was thinking about how to do that in Clojure rather than getting into the script. I posted it up because it could be useful, especially as it will work on any OS.


didn’t make any changes? Hm, wonder if that was because of the source folders or something