Skip to content

Commit

Permalink
Fixed argument destructuring in defc macro (closes #22)
Browse files Browse the repository at this point in the history
  • Loading branch information
tonsky committed Feb 20, 2015
1 parent c44b1a6 commit ee1bdea
Show file tree
Hide file tree
Showing 4 changed files with 344 additions and 327 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@ This is a detailed breakdown of what happens inside of Rum. By using `rum/defc`,

## Changes

### 0.2.5

- Fixed argument destructuring in defc macro (issue #22)

### 0.2.4

- `will-update` and `did-update` lifecycle methods added (thx @[Andrey Vasenin](https://github.com/avasenin), pull request #18)
Expand Down
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject rum "0.2.4"
(defproject rum "0.2.5"
:description "ClojureScript wrapper for React"
:url "https://github.com/tonsky/rum"
:license {:name "Eclipse Public License"
Expand Down
5 changes: 3 additions & 2 deletions src/rum.clj
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
`(let [render-fn# (fn ~argvec ~(s/compile-html `(do ~@render)))
render-mixin# (~render-ctor render-fn#)
class# (rum/build-class (concat [render-mixin#] ~mixins) ~(str name))
ctor# (fn ~argvec
(let [state# (args->state ~argvec)]
ctor# (fn [& args#]
(let [~argvec args#
state# (args->state args#)]
(rum/element class# state# nil)))]
(def ~name ~doc (with-meta ctor# {::class class#})))))

Expand Down
660 changes: 336 additions & 324 deletions web/rum.js

Large diffs are not rendered by default.

0 comments on commit ee1bdea

Please sign in to comment.