Dan Holmsand
908452c126
Be compatible with ClojureScript 0.0-2173: implement IAtom, ISwap,
...
IReset
2014-02-22 08:04:52 +01:00
Dan Holmsand
7951b43aeb
into-array is a tiny bit faster than reduce for seqs
2014-02-21 21:39:43 +01:00
Dan Holmsand
ec7b9acf23
Expose as-component, document current-component
2014-02-21 08:23:16 +01:00
Dan Holmsand
b9c3e106e8
Update React to 0.9.0
2014-02-21 08:04:16 +01:00
Dan Holmsand
b6c20ac863
Compare all maps passed to components the same way
2014-02-17 12:42:08 +01:00
Dan Holmsand
ba18691674
Cleanup
2014-02-15 12:29:16 +01:00
Dan Holmsand
1555fd9c3e
Revert ref support for the time being
...
There might be a more elegant way of supporting refs...
2014-02-15 12:27:46 +01:00
Dan Holmsand
2bb32eb21f
Make set-state etc async as well, by using an atom
2014-02-15 11:57:52 +01:00
Dan Holmsand
305fc73d8a
First stab at ref support
2014-02-15 11:03:24 +01:00
Dan Holmsand
b2bfc14afb
Move test code for partial
2014-02-14 11:27:45 +01:00
Dan Holmsand
effcbe6615
Move props accessors to util, add asserts for accessors in core
2014-02-14 11:13:30 +01:00
Dan Holmsand
695383c9a1
Cleanup template a little
2014-02-14 10:08:57 +01:00
Dan Holmsand
93c3f7194e
Introduce dev? macro
2014-02-14 09:38:09 +01:00
Dan Holmsand
7792f493c0
Avoid duplicating :key in both wrapper and child
2014-02-12 07:16:55 +01:00
Dan Holmsand
12ee54b083
Allow "key" to be specified with meta-data
...
These are now equivalent
[foo {:key 1}] and
(with-meta [foo] {:key 1})
2014-02-11 20:56:48 +01:00
Dan Holmsand
4882b51b64
Move react.js to vendor directory
2014-02-11 17:10:04 +01:00
Dan Holmsand
0b5f8c423e
next-tick moved as well
2014-02-11 15:52:16 +01:00
Dan Holmsand
6eb6b482f5
Factor out batching logic into own ns
2014-02-11 15:34:06 +01:00
Dan Holmsand
c18b8c318e
Get rid of pesky circular dependency
2014-02-11 15:08:50 +01:00
Dan Holmsand
c1f2f59bbc
Make equality checking more consistent
2014-02-11 13:57:56 +01:00
Dan Holmsand
41962bbe18
Reduce is great. Use it more
2014-02-11 12:41:00 +01:00
Dan Holmsand
b041427e94
Allow Hiccup tags to be strings and symbols as well
2014-02-11 12:03:44 +01:00
Dan Holmsand
ed4cf4e389
Allow component functions to be anything that satisfies ifn?
2014-02-11 11:36:58 +01:00
Dan Holmsand
a1ea281fc5
A little cleanup
2014-02-11 00:15:01 +01:00
Dan Holmsand
805264ea61
Warn on deref in seqs instead of silently failing
...
Use warning to improve color palette demo
Fix page title
Move more code to util.cljs
2014-02-10 23:54:30 +01:00
Dan Holmsand
81da69697e
Move update batching to util
2014-02-10 16:33:22 +01:00
Dan Holmsand
2901ab6a32
Make rendering faster by avoiding apply in more places
2014-02-10 15:52:32 +01:00
Dan Holmsand
8f1c02b273
Render without allocating ratom unless necessary
2014-02-10 15:29:38 +01:00
Dan Holmsand
51ac2be955
Avoid allocation in ratom
2014-02-10 12:46:17 +01:00
Dan Holmsand
cff71b0119
Make render function part of prototype
2014-02-10 11:50:11 +01:00
Dan Holmsand
16a41f67e4
Remove replace-args
...
Probably not very useful, and easy to add back if need be
2014-02-10 09:31:25 +01:00
Dan Holmsand
e76d81f16a
Allow e.g dangerously-set-inner-HTML
2014-02-10 09:12:29 +01:00
Dan Holmsand
b09c35457e
Improve error message for invalid Hiccup forms
2014-02-09 12:42:51 +01:00
Dan Holmsand
e32c3ad044
Fix bug in the new extract-children, and simplify wrapping
2014-02-09 08:48:55 +01:00
Dan Holmsand
3c2c63402e
Breaking change: Allow arbitrary arguments to component functions
...
Previously, the first argument had to be a map, and the rest of the
arguments where passed as a vector as the second argument.
Now [my-comp foo...] generally behaves as (my-comp foo...).
Since `this` is no longer passed to component functions, add
current-component function.
Also change signatures of React callbacks, to reflect that arbitrary
arguments can be passed.
Remove set-props and replace-props for the same reason.
Add argv accessor and set-args instead.
2014-02-08 13:55:01 +01:00
Dan Holmsand
69384d98c6
Simplify create-class
2014-02-08 10:55:29 +01:00
Dan Holmsand
aca69347b7
Merge branch 'delayed'
...
Conflicts:
src/reagent/impl/template.cljs
2014-02-03 14:07:02 +01:00
Dan Holmsand
046912a322
Add some doc strings
2014-02-03 13:59:02 +01:00
Dan Holmsand
e10548f8ba
Reduce is great, and fast. Use it more
2014-02-02 11:40:23 +01:00
Dan Holmsand
1b6b4e449e
Make sure all React lifecycle callbacks are supported
2014-02-02 11:38:25 +01:00
Dan Holmsand
d3407ff664
Consider symbols to be "identical"
...
And test some more obscure should-component-update variants.
2014-01-30 10:34:41 +01:00
Dan Holmsand
344e9e5db5
Make should-component-update a little faster for :style attrs
2014-01-29 11:40:07 +01:00
Dan Holmsand
b45a215f52
Speed up conversion to js a lot by using reduce-kv
2014-01-29 11:00:05 +01:00
Dan Holmsand
a91214e434
Add next-tick as utility on core.cljs
2014-01-28 20:19:10 +01:00
Dan Holmsand
e055fbad26
Make Closure stop whining about "dangerous use of this in static method"
2014-01-28 20:18:19 +01:00
Dan Holmsand
f654c6663f
Make textarea, radio buttons and checkboxes async-friendly
...
And clean up code a little
2014-01-28 19:34:06 +01:00
Dan Holmsand
d1851d5a42
Allow dynamic id with hiccup-style classes
...
And id in props wins over static id.
Fixes #11
2014-01-28 18:00:15 +01:00
Dan Holmsand
8b4ec9fda6
Make managed inputs work better with async rendering
2014-01-28 17:23:39 +01:00
Dan Holmsand
4a537af429
Use prefixed requestAnimationFrames if available
2014-01-27 16:26:21 +01:00
Dan Holmsand
dfe0eb41d5
Batch updates properly by rendering parents before children
2014-01-27 16:17:37 +01:00