[ClojureScript] Re: reagent: how to initialize state?

2014-09-16 Thread Matt Ho
Good point. Thanks! -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email

[ClojureScript] Re: reagent: how to initialize state?

2014-09-15 Thread Mike Thompson
Just for completeness, I note that you could also have done this: (defn weeks-view [calendar] (fn [calendar];; calendar added here (let [weeks (partition 7 calendar)] [:tbody.weeks (for [week weeks] [week-view week])]))) -- Note that po

[ClojureScript] Re: reagent: how to initialize state?

2014-09-15 Thread Matt Ho
Figured it out. Turns out it had nothing to do with the above calls. It was more a misunderstanding of how local state worked. This was bad: (defn weeks-view [calendar] (let [weeks (partition 7 calendar)] (fn [] [:tbody.weeks (for [week weeks] [week-view week]