Dan Holmsand
8b5905c9e1
Add reactify-component: adapts Reagent component for use in JSX
2015-02-08 00:04:45 +01:00
Dan Holmsand
b574d8cc5a
Add state-atom (again)
2015-02-07 09:39:33 +01:00
Dan Holmsand
ac3ed8dbe0
Mention :reagent-render in docs, and use it in template.cljs
2015-02-04 22:55:55 +01:00
Dan Holmsand
721e3bab00
Revert adding of state-atom
...
There may be a better api - and it's not very important anyway.
2015-02-04 22:50:22 +01:00
Dan Holmsand
017fa9c106
Rename :component-function to :reagent-render
...
But keep :component-function as alias for the time being
2015-02-04 22:45:39 +01:00
Dan Holmsand
c862792624
Revert experiment with lazy reaction
...
Needs more surgery to get this to work properly
2015-02-04 22:14:04 +01:00
Dan Holmsand
d39656624d
Make Reaction and cursors lazy
...
Their value will now only be calculated as needed (i.e when deref
is called), which should make debugging them much easier.
This also makes updating the atom they are relying on cheaper.
2015-02-04 16:03:35 +01:00
Dan Holmsand
9260d9b74b
More docs for cursor
2015-02-02 22:14:57 +01:00
Dan Holmsand
600d6bbb59
Add some docs for adapt-react-class
2015-02-02 17:47:01 +01:00
Dan Holmsand
15acc0d6ff
Added adapt-react-class
2015-02-02 15:19:43 +01:00
Dan Holmsand
7df2941c7d
Better error reporting
...
Warnings are now printed using console.warn. The name of the current
component is included in more cases.
Also warn every time an atom is derefed in a lazy seq, and not just
the first.
2015-02-02 13:41:29 +01:00
Dan Holmsand
5eca79a433
Try warn when passing native React classes to hiccup form
2015-02-01 21:43:41 +01:00
Dan Holmsand
f005fe3d1e
Expose state-atom
2015-02-01 21:13:05 +01:00
Dan Holmsand
81dfa7c682
Allow auto-running reaction to be watched
2015-02-01 20:26:18 +01:00
Dan Holmsand
2c7abcb710
Add warning when derefing a changed wrap
2015-02-01 19:53:00 +01:00
Dan Holmsand
6e0e9ed564
Make wrap watchable
2015-02-01 19:43:26 +01:00
Dan Holmsand
5798a3f056
Move wrap to ratom
2015-02-01 19:22:46 +01:00
Dan Holmsand
742a8d3575
Add some preliminary docs
2015-02-01 15:29:04 +01:00
Dan Holmsand
83fd1361df
Remove bundled React
...
No longer needed, since we use cljsjs/react instead.
Also remove obsolete interop macros, and some general cleanup
2015-02-01 15:13:08 +01:00
Dan Holmsand
58fd72cd86
Make sure setter can override values in Reaction
...
Also assert that cursor src isn't a vector.
And a little cleanup.
2015-02-01 12:53:44 +01:00
Dan Holmsand
744165737f
Make Reaction always call watches
...
Even if it is not executed automatically
2015-02-01 00:41:59 +01:00
Dan Holmsand
6d9bb35996
Deprecate calling cursor with atom as second argument
2015-01-31 14:29:01 +01:00
Dan Holmsand
86bf871329
Swap order of arguments to cursor
...
So now it should be called as (r/cursor atom path). The old order
still works though.
2015-01-31 14:08:19 +01:00
Dan Holmsand
976d8ba4f6
Make cursor more general and flexible
...
Instead of passing an atom, you can now pass a function.
That function is passed one argument (the path provided to cursor)
when deref-ing, and two arguments (path and new value) when
resetting.
Remove the old setter, and the currying version.
2015-01-31 13:32:48 +01:00
Dan Holmsand
00b5c1d330
Add tests from reagent-cursor
2015-01-31 11:01:35 +01:00
Dan Holmsand
c64cab83a4
Make cursor use Reaction all the way
2015-01-31 09:55:32 +01:00
Dan Holmsand
0e7f5518c0
Allow deref of Reaction outside active Reaction
2015-01-30 21:20:02 +01:00
Dan Holmsand
0b97403d1b
Use cljsjs/react and require clojurescript >= 2740
...
This means that old style :preamble inclusion is deprecated.
2015-01-29 14:49:01 +01:00
Dan Holmsand
69ae860a0e
Streamline template.cljs a little
2014-12-19 18:35:49 +01:00
Dan Holmsand
2de7f28eed
Fix multimethods with newer ClojureScript
2014-12-18 20:32:23 +01:00
Dan Holmsand
c072ae8249
Some clean-up of prop conversion
2014-12-16 13:33:52 +01:00
Dan Holmsand
99aeb989c8
Use implements? everywhere for consistency
2014-12-15 20:16:15 +01:00
Dan Holmsand
754aeee5ad
Simplify prop-name handling a little
2014-12-15 15:21:28 +01:00
Dan Holmsand
771fa2d073
Tiny optimization of tag- and prop-name parsing
2014-12-15 14:46:34 +01:00
Dan Holmsand
e6fa29dfb8
A couple of simple optimizations
2014-12-12 09:42:42 +01:00
Dan Holmsand
54a4e28245
Remove four argument version of render for now
2014-12-09 13:29:26 +01:00
Dan Holmsand
197aca78d4
Misc cleanup
2014-12-08 13:37:25 +01:00
Dan Holmsand
59b2e6d6ee
Cleanup and fix for ClojureScript 0.0-2411
2014-12-07 21:07:32 +01:00
Dan Holmsand
fc2c59c3e1
Add docs for create-element, and one-argument version
...
And add a fix for the benefit of Light Table
2014-12-07 20:26:29 +01:00
Dan Holmsand
1a2417a14b
Fix tests when macros change
2014-12-07 16:38:28 +01:00
Dan Holmsand
ed06312eaf
Make render force already mounted components to update by default
...
This should make using Reagent with figwheel more convenient (no need
for force-update-all). Add a fourth argument to render that controls
the updating.
2014-12-07 10:00:47 +01:00
Dan Holmsand
e193518292
Add a few more tests for wrap
2014-12-03 16:07:58 +01:00
Dan Holmsand
f673481c88
Support meta keys in native elements
2014-12-02 15:31:11 +01:00
Dan Holmsand
3c6d6cec1d
Remove helper for shouldComponentUpdate
2014-12-02 12:30:21 +01:00
Dan Holmsand
a66de12cf5
Some refactoring
2014-12-02 11:58:24 +01:00
Dan Holmsand
0a8bc67d5f
Introduce create-element
2014-12-02 11:44:42 +01:00
Dan Holmsand
a48e70c4de
as-component -> as-element
2014-12-02 11:17:07 +01:00
Dan Holmsand
b287b32860
Some code cleanup
2014-12-01 14:37:54 +01:00
Dan Holmsand
c030cf7266
Fix mount ordering to be more robust
2014-12-01 14:27:51 +01:00
Dan Holmsand
4e62b415ba
Get rid of old wrapping code
...
Inputs are now backed by a proper Reagent component. The same class
is now shared by every input instance.
2014-11-30 16:41:00 +01:00