Skip to content
This repository was archived by the owner on Mar 28, 2025. It is now read-only.

Commit ee1bdea

Browse files
committed
Fixed argument destructuring in defc macro (closes #22)
1 parent c44b1a6 commit ee1bdea

File tree

4 files changed

+344
-327
lines changed

4 files changed

+344
-327
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,10 @@ This is a detailed breakdown of what happens inside of Rum. By using `rum/defc`,
293293

294294
## Changes
295295

296+
### 0.2.5
297+
298+
- Fixed argument destructuring in defc macro (issue #22)
299+
296300
### 0.2.4
297301

298302
- `will-update` and `did-update` lifecycle methods added (thx @[Andrey Vasenin](https://github.com/avasenin), pull request #18)

project.clj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(defproject rum "0.2.4"
1+
(defproject rum "0.2.5"
22
:description "ClojureScript wrapper for React"
33
:url "https://github.com/tonsky/rum"
44
:license {:name "Eclipse Public License"

src/rum.clj

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@
2525
`(let [render-fn# (fn ~argvec ~(s/compile-html `(do ~@render)))
2626
render-mixin# (~render-ctor render-fn#)
2727
class# (rum/build-class (concat [render-mixin#] ~mixins) ~(str name))
28-
ctor# (fn ~argvec
29-
(let [state# (args->state ~argvec)]
28+
ctor# (fn [& args#]
29+
(let [~argvec args#
30+
state# (args->state args#)]
3031
(rum/element class# state# nil)))]
3132
(def ~name ~doc (with-meta ctor# {::class class#})))))
3233

web/rum.js

+336-324
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)