Fork me on GitHub

One more question. If I have a simple but big CRUD program I want to write, and a lot of different panels/views, do I need to go fully with this if I'll have lots of handlers and subs and views? OR, suppose I'll just have lots of components, can I just split up components into a views.* namespace somewhere require those? Is there a good was to structure that sort of thing?


And if I do go with the "A Larger App" way, does anyone know of any examples of how to put that together? A core file that has to require each of the namespaces for each panel?


@josh.freckleton: if re-com intimidated you (it takes care of many things!), here's what I think is a simplified version of that internal/external pattern:


the only difference with your scenario is that search-term would probably be something like subscribe [:password] and the on-change (the second arg) would be something like (fn [v] (dispatch [:update-login-form :password v]))


@nberger: this is a huge help! Thanks so much Nicolás!


A question about performance: I have a relational setup in my db. For example I have one entry that is :current-item which is an integer with the item id. To access the item I look that value up in the map :items. Should i put two subscriptions in my component, one to get current item (id) and then call the next subscription to get the item itself with that id or should I just nest get-instatements in the reaction inside the sub?


@vikeri: both approaches are going to be fast enough.


For the 1st approach, you might need to use dynamic subscriptions (the subscription to the item will change when the subscription to :current-item changes)