Commit Graph

349 Commits

Author SHA1 Message Date
Dan Holmsand 0b1c7ffc33 Make simple-example use figwheel 2015-02-09 09:43:43 +01:00
Dan Holmsand a29e0c75c7 Make sure reactify-component always re-renders
It might get mutable data from js
2015-02-08 13:20:40 +01:00
Dan Holmsand e6c8639277 Try harder to find meaningful name for components
Thereby hopefully improving warning messages a bit.
2015-02-08 12:56:56 +01:00
Dan Holmsand a1e4de4d68 Make tests only run once when figwheel reloads 2015-02-08 12:26:39 +01:00
Dan Holmsand a2b5acb68f Make warning for missing keys print data
That will hopefully make finding the offending code easier
to find.
2015-02-08 12:24:52 +01:00
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 7641288982 Use figwheel 0.2.3 and cleanup of project.clj 2015-02-07 09:30:20 +01:00
Dan Holmsand 5a8738d2c4 Update clojurescript to 0.0-2760 2015-02-05 11:39:09 +01:00
Dan Holmsand 4eee0f4d06 Add more stuff to changelog 2015-02-04 23:13:15 +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 81e826df03 Update clojurescript to 2755 2015-02-02 13:52:22 +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 9d0d0680ec Remove unused css from todomvc example 2015-02-01 20:16:23 +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 dfd3e540f3 Use cljs.test 2015-01-31 23:09:42 +01:00
Dan Holmsand d57fbc8fd6 Simplify page handling in demo a little 2015-01-31 22:02:30 +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 a28dc812ae Check for memory leaks 2015-01-31 12:22:53 +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 99cc5ef506 Use source-map-timestamp 2015-01-30 17:09:24 +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 54e0790d73 Update React to 0.12.2 2014-12-19 18:43:15 +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