Skip to content

Instantly share code, notes, and snippets.

@jeaye

jeaye/fx.clj Secret

Created October 9, 2017 18:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeaye/5f1da6d07f011120c4a95b3843aa3177 to your computer and use it in GitHub Desktop.
Save jeaye/5f1da6d07f011120c4a95b3843aa3177 to your computer and use it in GitHub Desktop.
(re-frame/reg-event-fx
:start-playing
(fn [db _]
{:db (assoc db :is-playing? true
:fake (random-active-color db)
:real (random-active-color db))
:interval {:action :start
:id :some-awesome-id
:frequency 1000
:event [:tick]}}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment