Commit Graph

359 Commits

Author SHA1 Message Date
Dan Holmsand c6b56a7a76 Simplify props handling
Call Cloact components with separate cljsArgs and cljsChildren
props. That simplifies (and speeds up) code, for the small
price of one call to subvec.
2014-01-08 15:08:29 +01:00
Dan Holmsand 8a8779c736 Cleanup 2014-01-08 09:47:12 +01:00
Dan Holmsand 176f7b885c Make ratom macros less fancy 2014-01-07 20:32:00 +01:00
Dan Holmsand b93f48ba47 Clean project.clj up 2014-01-07 20:04:49 +01:00
Dan Holmsand 53fef42768 Breaking change: Stop implementing IDeref in cloact components
Introduce set-state, replace-state and state functions instead.

Since we already have our own atom, it doesn't make any sense
to duplicate functionality. Also, the implementation was necessarily
very messy, and fragile.
2014-01-07 19:57:40 +01:00
Dan Holmsand 00317991ee More docs 2014-01-07 17:01:28 +01:00
Dan Holmsand 062fb33cb3 Make demo a little prettier 2014-01-07 12:45:08 +01:00
Dan Holmsand 16c50fdf1d Make equal-args use = less often 2014-01-07 12:43:53 +01:00
Dan Holmsand f9e0dfe4b3 Syntaxify comments 2014-01-06 22:27:22 +01:00
Dan Holmsand 2c093bf47c Simplify example by not trying to be fancy 2014-01-06 20:58:39 +01:00
Dan Holmsand c159984024 Include examples and tests in demo page 2014-01-06 19:16:53 +01:00
Dan Holmsand 4099c00838 Refactor template a bit 2014-01-06 18:35:05 +01:00
Dan Holmsand 11a1c62024 Wrap different React classes in distinct wrappers
That should improve performance a little, and help React's diffing
2014-01-06 16:35:39 +01:00
Dan Holmsand dd3f9b10e1 Move equal-args out to util 2014-01-06 15:19:12 +01:00
Dan Holmsand 3dc2c0950a Refactor demo 2014-01-06 12:46:58 +01:00
Dan Holmsand d16d0b2405 Color parens of different levels differently 2014-01-05 15:52:51 +01:00
Dan Holmsand 5031284e81 Improve syntax highlighting a little 2014-01-05 14:47:06 +01:00
Dan Holmsand 62322c474f Add a couple of asserts, and a link 2014-01-05 13:29:22 +01:00
Dan Holmsand 2c2dca026c Generate demo page 2014-01-05 11:16:01 +01:00
Dan Holmsand 93759f6043 Improve demo a little 2014-01-04 15:05:42 +01:00
Dan Holmsand 0f45462034 One more example 2014-01-04 10:56:21 +01:00
Dan Holmsand 9df8609f45 Update React to 0.8.0 2014-01-03 16:54:38 +01:00
Dan Holmsand 7381678bc2 Use :key in example, and explain why 2014-01-03 16:52:05 +01:00
Dan Holmsand af45084966 Remove support for refs for now
It shouldn't be necessary for Cloact, since we can share data
between components using atoms. And it was broken and untested
anyway...
2014-01-03 16:40:10 +01:00
Dan Holmsand a0aa670c79 Make demo prettier 2014-01-03 15:52:44 +01:00
Dan Holmsand 059e190841 Document render-component 2014-01-03 15:52:18 +01:00
Dan Holmsand dc6b50e864 Documentation for atom 2014-01-03 13:22:41 +01:00
Dan Holmsand 21823e12d0 Started writing some documentation 2014-01-03 10:56:15 +01:00
Dan Holmsand 1bb8f7e3e9 Add simple syntax highlighting 2014-01-02 17:45:31 +01:00
Dan Holmsand 3aa5f57c05 Add BMI-calculator 2014-01-02 16:18:21 +01:00
Dan Holmsand 454a7af31d Start on docs and demos 2014-01-02 14:04:30 +01:00
Dan Holmsand cb60a6094f Make conversion to js a tiny bit faster 2014-01-02 11:18:00 +01:00
Dan Holmsand 30f9681d4e Update clojurescript 2014-01-02 11:17:50 +01:00
Dan Holmsand 42f392f208 Only pass key and ref to react if necessary 2013-12-20 19:23:24 +01:00
Dan Holmsand 9344edc7da Compare props map using identical? only
That makes shouldComponentUpdate even faster, especially with big
maps/vectors as args
2013-12-20 19:18:02 +01:00
Dan Holmsand 8bd03a8b36 Simplify handling of state
Just compare new state with identical?, and forceUpdate if necessary
2013-12-20 19:01:58 +01:00
Dan Holmsand 1ad5ef44e8 Update React to 0.5.2 2013-12-19 19:40:58 +01:00
Dan Holmsand 0d44dc34bc Clean component.cljs up 2013-12-19 19:39:03 +01:00
Dan Holmsand 45c32d9f61 Fix typo 2013-12-19 14:08:25 +01:00
Dan Holmsand 9b3f188e91 Upload to clojars 2013-12-19 14:06:49 +01:00
Dan Holmsand 2c9162271e Add readme 2013-12-19 13:11:14 +01:00
Dan Holmsand cfe97087e6 Version 0.0.3 2013-12-18 15:02:57 +01:00
Dan Holmsand 2ca62689f9 Avoid closure's mangling by evaling react.min.js 2013-12-18 14:56:38 +01:00
Dan Holmsand c26d3550f4 Make test work with node 2013-12-18 12:14:57 +01:00
Dan Holmsand 88d6361540 Make to-string more convenient 2013-12-18 09:13:16 +01:00
Dan Holmsand 6191a4c0bc Add some animation to todomvc 2013-12-17 22:25:11 +01:00
Dan Holmsand 59b3d9c69c Version 0.0.2 2013-12-17 20:10:03 +01:00
Dan Holmsand 00ac6d69f3 Fix shouldComponentUpdate calling 2013-12-17 19:37:32 +01:00
Dan Holmsand 662714a5e0 Don't be so clever with reactive props 2013-12-17 19:20:20 +01:00
Dan Holmsand 239120954d Update dependencies 2013-12-17 15:29:02 +01:00