Fork me on GitHub

@lilactown Some Background ... I think this idea originally came via @olivergeorge in this thread. Because it seemed like a good idea, Isaac made a first round of changes to re-frame to help accommodate better composition: But: • I never wrote proper docs which is a problem because the decision was to add supportive features and then let improved docs look after the rest of the best practice side of this. • I ultimately decided not to go the whole hog and create a new registration function to specifically support composition (reasoning can be seen in that issue thread)


FWIW, what we are doing more or less came from the (somewhat hidden) docs for :fx and the parallels I saw with elm's Cmds. This is the first time I'm seeing this discussion thread


somewhat tangential, but also a neat thing would be if {:fx nil} were valid. Would eliminate the fx/none we have around paralleling elm's Cmd.none


@U3JH98J4R Without checking, I suspect {:fx nil} would work Certainly {:fx []} would work


If there is anything we can do to improve experience please create an issue


it does not. nil is not sequential

(if-not (sequential? seq-of-effects)
      (console :error "re-frame: \":fx\" effect expects a seq, but was given " (type seq-of-effects))


well it does but with a warning


i'll make an issue

Oliver George01:07:11

I’ll gladly contribute to the conversation but it might take me a day or two… I need to compose my thoughts (pun intended)