Skip to content

re-frame library to work with intervals, using core.async

License

Notifications You must be signed in to change notification settings

caioaao/re-interval

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

re-interval

A re-frame/ClojureScript library for creating intervals controlled by events.

Dependency

Add this to your project.clj:

Clojars Project

Usage

To create an interval:

(require '[re-interval.core :refer [register-interval-handlers]])
(register-interval-handlers :interval-prefix middleware timeout-in-ms)

To activate the interval, dispatch the event :interval-prefix/start. When active, an event :interval-prefix/tick will be dispatched every timeout ms.

To stop and restart, dispatch :interval-prefix/stop and :interval-prefix/restart, respectivelly.

Contributing / literate programming

As part of an exercise, I've created this library following literate programming techniques. For anyone interested, the documentation that generated the source is in the file project.org. Just need to connect to a REPL and run the code blocks :)

About

re-frame library to work with intervals, using core.async

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published