mirror of
https://github.com/status-im/re-frame.git
synced 2025-02-23 07:18:22 +00:00
Bump various for a v0.3.2 release
This commit is contained in:
parent
6ed3ba1e1f
commit
72b605340e
18
CHANGES.md
18
CHANGES.md
@ -1,19 +1,9 @@
|
||||
|
||||
## Planned for v0.4.0
|
||||
|
||||
- automatically wrap subscriptions in a `reaction` (removing the need for over
|
||||
10 keystrokes per handler!!). Just kidding there are better reasons than that.
|
||||
- further develop the debugging story.
|
||||
- modifiy todoMVC for new subscriptions approach
|
||||
- document new sbscriptions approach
|
||||
- move contents of README across to Wiki. Make Readme simpler and more pragmatic.
|
||||
- produce a more fully featured todomvc (beyond the standard one), todomvc-with-extras
|
||||
- use `enrich` to handle todo duplication
|
||||
- add prismatic schema
|
||||
- show testing
|
||||
- show debug
|
||||
- undo
|
||||
## v0.3.2 (2015-04-21)
|
||||
|
||||
Improvements:
|
||||
- Fix #42 - Put in checks for dispatch-sync
|
||||
- Fix #49 - add table of content and link to wiki for middleware
|
||||
|
||||
|
||||
## v0.3.1 (2015-04-18)
|
||||
|
35
README.md
35
README.md
@ -57,30 +57,33 @@ Features:
|
||||
|
||||
__Warning__: this is a long document. That was the summary. The rest is a tutorial.
|
||||
|
||||
*Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
|
||||
|
||||
- [What Problem Does It Solve?](#what-problem-does-it-solve)
|
||||
- [Correct Acronym?](#correct-acronym)
|
||||
- [Mostly A Mashup](#mostly-a-mashup)
|
||||
- [Client Side Bias](#client-side-bias)
|
||||
- [Guiding Philosophy](#guiding-philosophy)
|
||||
- [FRP Clarifications](#frp-clarifications)
|
||||
- [Explaining re-frame](#explaining-re-frame)
|
||||
## Table of Contents
|
||||
|
||||
*generated by [DocToc](https://github.com/thlorenz/doctoc)*
|
||||
|
||||
- [What Problem Does It Solve?](#what-problem-does-it-solve)
|
||||
- [Correct Acronym?](#correct-acronym)
|
||||
- [Mostly A Mashup](#mostly-a-mashup)
|
||||
- [Client Side Bias](#client-side-bias)
|
||||
- [Guiding Philosophy](#guiding-philosophy)
|
||||
- [FRP Clarifications](#frp-clarifications)
|
||||
- [Explaining re-frame](#explaining-re-frame)
|
||||
- [On Data](#on-data)
|
||||
- [The Big Ratom](#the-big-ratom)
|
||||
- [The Benefits Of Data-In-The-One-Place](#the-benefits-of-data-in-the-one-place)
|
||||
- [Flow](#flow)
|
||||
- [Flow](#flow)
|
||||
- [How Flow Happens In Reagent](#how-flow-happens-in-reagent)
|
||||
- [Components](#components)
|
||||
- [Components](#components)
|
||||
- [Truth Interlude](#truth-interlude)
|
||||
- [Components Like Templates?](#components-like-templates)
|
||||
- [React etc.](#react-etc)
|
||||
- [Subscribe](#subscribe)
|
||||
- [Subscribe](#subscribe)
|
||||
- [Just A Read-Only Cursor?](#just-a-read-only-cursor)
|
||||
- [The Signal Graph](#the-signal-graph)
|
||||
- [A More Efficient Signal Graph](#a-more-efficient-signal-graph)
|
||||
- [The 2nd Flow](#the-2nd-flow)
|
||||
- [Event Flow](#event-flow)
|
||||
- [The Signal Graph](#the-signal-graph)
|
||||
- [A More Efficient Signal Graph](#a-more-efficient-signal-graph)
|
||||
- [The 2nd Flow](#the-2nd-flow)
|
||||
- [Event Flow](#event-flow)
|
||||
- [What are events?](#what-are-events)
|
||||
- [Dispatching Events](#dispatching-events)
|
||||
- [Event Handlers](#event-handlers)
|
||||
@ -90,7 +93,7 @@ __Warning__: this is a long document. That was the summary. The rest is a tutor
|
||||
- [Derived Data, Everywhere, flowing](#derived-data-everywhere-flowing)
|
||||
- [Logging And Debugging](#logging-and-debugging)
|
||||
- [Talking To A Server](#talking-to-a-server)
|
||||
- [The CPU Hog Problem](#the-cpu-hog-problem)
|
||||
- [The CPU Hog Problem](#the-cpu-hog-problem)
|
||||
- [In Summary](#in-summary)
|
||||
- [Licence](#licence)
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
|
||||
(defproject simple-re-frame "0.5.0"
|
||||
(defproject simple-re-frame "0.3.2"
|
||||
:dependencies [[org.clojure/clojure "1.6.0"]
|
||||
[org.clojure/clojurescript "0.0-3208"]
|
||||
[reagent "0.5.0"]
|
||||
[re-frame "0.4.0.SNAPSHOT"]
|
||||
[re-frame "0.3.2"]
|
||||
[figwheel "0.2.6"]]
|
||||
|
||||
:plugins [[lein-cljsbuild "1.0.4"]
|
||||
:plugins [[lein-cljsbuild "1.0.5"]
|
||||
[lein-figwheel "0.2.3-SNAPSHOT"]]
|
||||
|
||||
:hooks [leiningen.cljsbuild]
|
||||
|
@ -1,11 +1,11 @@
|
||||
(defproject todomvc-re-frame "0.3.1"
|
||||
(defproject todomvc-re-frame "0.3.2"
|
||||
:dependencies [[org.clojure/clojure "1.6.0"]
|
||||
[org.clojure/clojurescript "0.0-3208"]
|
||||
[reagent "0.5.0"]
|
||||
[re-frame "0.4.0.SNAPSHOT"]
|
||||
[secretary "1.2.1"]]
|
||||
[re-frame "0.3.2"]
|
||||
[secretary "1.2.3"]]
|
||||
|
||||
:plugins [[lein-cljsbuild "1.0.4"]]
|
||||
:plugins [[lein-cljsbuild "1.0.5"]]
|
||||
|
||||
:hooks [leiningen.cljsbuild]
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
(defproject re-frame "0.4.0.SNAPSHOT"
|
||||
(defproject re-frame "0.3.2"
|
||||
:description "A Clojurescript MVC-like Framework For Writing SPAs Using Regent."
|
||||
:url "https://github.com/Day8/re-frame.git"
|
||||
:license {:name "MIT"}
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
:profiles {:debug {:debug true}
|
||||
:dev {:dependencies [[spellhouse/clairvoyant "0.0-48-gf5e59d3"]]
|
||||
:plugins [[lein-cljsbuild "1.0.4"]
|
||||
:plugins [[lein-cljsbuild "1.0.5"]
|
||||
[com.cemerick/clojurescript.test "0.3.3"]]}}
|
||||
|
||||
|
||||
|
@ -26,73 +26,3 @@
|
||||
(warn "re-frame: no subscription handler registered for: \"" key-v "\". Returning a nil subscription.")
|
||||
(handler-fn app-db v))))
|
||||
|
||||
|
||||
;; -- NEW VERSIONS OF SUBSCRIBE ---------------------
|
||||
;; How do I test pure functions? Turn off reactions
|
||||
;; How do I send debug
|
||||
;; Create constants ? re-frame.atoms-not-reactions
|
||||
;; Can I use the "run straight away flag on the make-reaction.
|
||||
;;
|
||||
;; Need to remove all use of @ within the
|
||||
;; assert app-db is a IAtom ... in testing they might get it wrong
|
||||
;;
|
||||
|
||||
;; helper
|
||||
(defn fetch
|
||||
[& args]
|
||||
(fn [db _]
|
||||
(get-in db (flatten args)))) ;; XXX args perhaps join into a vector concat ?
|
||||
|
||||
|
||||
(defn- debug-wrapper
|
||||
"I wrap a subscription handler, so that each rime it runs, it proceses console log.
|
||||
This console logging disppears for production code."
|
||||
[handler-fn]
|
||||
(if-not goog.DEBUG
|
||||
handler-fn
|
||||
(fn [app-db v]
|
||||
(group "re-frame: running subscription handler for: " v)
|
||||
(let [val (handler-fn app-db v)]
|
||||
(log "=>" val)
|
||||
(groupEnd)
|
||||
val))))
|
||||
|
||||
|
||||
(defn register-1
|
||||
"usage:
|
||||
(register-1
|
||||
:todos
|
||||
(fetch [:todos]))
|
||||
"
|
||||
[key-v handler-fn]
|
||||
(let [handler-fn (debug-wrapper handler-fn)
|
||||
handler-fn (fn [app-db v]
|
||||
(make-reaction #(handler-fn app-db v)))]
|
||||
(register key-v handler-fn)
|
||||
handler-fn))
|
||||
|
||||
|
||||
|
||||
(defn register-2
|
||||
"usage:
|
||||
(register-2
|
||||
:some-id
|
||||
[f g] ;; both f and g are functions (app-db v) -> val
|
||||
(fn [f-result g-result v] ;; <--- instead of [app-db v]
|
||||
use f-result and g-result )) ;; autowrapped in a reaction
|
||||
|
||||
"
|
||||
[key-v inputs-v handler-fn] ;; XXX allow an arity with no input-v ??? but naming then harder.
|
||||
(let [vec-or-kw? #(or (vector? %1) (keyword? %1))
|
||||
wrap-in-a-from #(if (vec-or-kw? %1) (from %1) %1)
|
||||
input-fns (map wrap-in-a-from inputs-v) ;; look for paths and convert them.
|
||||
|
||||
build-sig-graph-fn
|
||||
(fn [app-db v]
|
||||
(let [wrap-in-reaction (fn [f] (make-reaction #(f app-db v)))
|
||||
reaction-inputs (map wrap-in-reaction input-fns) ;; each input is now a reaction
|
||||
rective-handler-fn (fn [] (let [input-vals (map deref reaction-inputs)] ;; deref input signals !!
|
||||
(apply handler-fn (conj input-vals v))))]
|
||||
(make-reaction rective-handler-fn)))] ;; deref all the inputs, but only if NOT TESTING wrap in a
|
||||
(register key-v build-sig-graph-fn)
|
||||
build-sig-graph-fn))
|
||||
|
Loading…
x
Reference in New Issue
Block a user