Fork me on GitHub

(swap! state #(-> %


So you could have that code be your mutation, and it calls other 'mutations', which are not mutations but state->state transformations.


Part of what I need to do is affect something on the server side. The state->state transformation would work otherwise.


@grzm so, if you are trying to chain calls to transact! the general advice is to adjust your thinking and see if you can write it as a single thing instead. The chaining leads to complexity in code that may not be necessary. The supported chaining is on true mutations (not loads) via ptransact!. The book covers this.


If you see no other way of avoiding submitting a new transaction on a post-mutation from a load, then submit a new one with transact!. The general recommendation, though, is to use something like to defer it until the current transaction processing is complete. Pretty sure we recently made the reconciler available in the env in the post mutations (it is usually available in the env of regular ones as well)

Drew Verlee01:01:26

wow i love the effort put into helping ppl learn about fulcro, via videos, tutorials, etc…


So, I just added documentation about all of the included Bootstrap wrappers to the book. For those not aware of them: Fulcro has had (for quite some time now) a bootstrap3 namespace with helpers for using bootstrap CSS. I added these for two reasons: having a cljc implementation of the active bits means that you can easily use them with JVM SSR, and also to demonstrate that it isn’t that difficult to build wrappers around existing CSS libraries to get active components you might need that can also work well with good SSR. That said: I think it is important to know that using Javascript libraries of react components is also quite tractable (though I’d recommend shadow-cljs if you’re doing so). If you need server-side rendering, then it will require you to either write static wrappers around them (for rendering on the JVM) or use Nashorn. The latter works, but has some overhead in development effort and speed.


I also expanded the html-entities namespace to include all of the well-know entities that are used in HTML for easier use in React


@tony.kay Yeah, that's what my gut was telling me, and it's definitely in pursuit of working around another issue, rather than a desired design. I'm having trouble moving (i.e., creating, disposing, and creating anew) a KeyboardShortcutHandler between items of a list (currently working up a test case).


I’ll be releasing these code expansions in a few


@grzm I would expect shortcut handlers to be something you mess with on mount, no? Standard React lifecycle stuff.


Fulcro 2.1.3 is now on clojars with expanded HTML entities and key codes.


( some-key-code-event) 
(dom/span nil (str "A dagger: " fulcro.ui.html-entities/Dagger))


@tony.kay Yeah, I'm creating them in componentDidMount and calling .dispose in componentDidUpdate. I can see that they're no longer active (via .getDisposed), but the wrong triggers are getting called on the key events.


I'll take a look at those examples as well.


I just created my own network implementation and I needed the app inside my network object. In all the examples there is a complete-app property in the network record which never get's filled. Is this just old cruft or is there something wrong?


in the past Fulcro had a start on the network that used to receive the app, but at some point that ended up being a circular reference and had to be dropped


there is no good way AFAIK to handle, what I have done is to inject it later, you can send an atom to the network, and on your started-callback you can set the atom content to be the app, so after that the network can deref and read it


I did exactly the same ^^


Yeah, that should really be on my list of things to clean up 🙂


how hard is it to use sablono with fulcro? I don't mind paying a small perf. penalty to avoid all this dom/div and #js stuff.


@chrisblom should work fine. I think some people have problems with it and SSR, but I don’t use it so I can’t say.


Is there a difference between a link key and a top-level (alternatively root-level) join key? They share the fact that they are both keys in the state. A root join's value will either be an Ident or a vector of Idents, whereas the value of a link key will always be a map.