Skip to content

middleware library for automatic resolution of promesa-promises

License

Notifications You must be signed in to change notification settings

readux/readux-promesa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

readux-promesa

A middleware function implementing automatic resolution and dispatching of promesa-based promises.

#(rdc/dispatch 
  store
  :fetch-posts
  [(p/promise (fn [done err](err 20))) "something" "else"])

;; Dispatches :fetch-posts-rq
;;   data: {:data ("something" "else")}
;; ... when promise is resolved
;; Dispatches :fetch-posts-error
;;   data:  {:data ("something" "else")
;;           :payload nil
;;           :error 20}
#(rdc/dispatch 
  store
  :fetch-posts
  [(p/promise (fn [done err](done 10))) "something"])

;; Dispatches :fetch-posts-rq
;;   data: {:data ("something" "else")}
;; ... when promise is resolved
;; Dispatches :fetch-posts-success
;;   data:  {:data ("something")
;;           :payload 10}

readux

A ClojureScript library to facilitate predictable state state management for your reagent-based web-apps. Conceptually, Readux is a reimplementation of the redux library.

Please see the docs for more information.

License

Copyright © 2016 Jesper Wendel Devantier

Distributed under the MIT License. By submitting a pull request for this project, you agree to license your contribution under the MIT license to this project.

About

middleware library for automatic resolution of promesa-promises

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published