(om newbie, but getting less so :)) [overhead] Is there any overhead for a react component at runtime? If I have a single component which emits a bunch of <li>, is there any cost to having each <li> be an instance of a component which emits that <li>?
[transform cursor] Is it OK to transform the cursor that is sent to a child component? For example, in my app-state I have a property "left-nav-expanded? :bool". This is consumed by a generic "nav" component which wants an "expanded?" property. At the moment I have the parent component do something like "(om/build nav (assoc app :expanded? (:left-nav-expanded? app))". Is that allowed? I want the expanded to be app state not component state BTW. Another example of this is I have a selected-id and I want the table to add a "selected" class to the relevant row. Again, I want the selected-id to be part of the app-state (as it needs to be preserved between sub-pages) so the table has the selected-id property and the row components receive data containing "selected?". This does mean every row gets "processed" when the selected-id changes, which is making IE8 really quite slow unfortunately but I don't want to store "selected?" in the app-state on the row as the list in app-state is domain specific not UI specific. Is the idiomatic approach to add a "selected?" on each item in the list in app-state? [Emit only components necessary or use "display" to show/hide components?] Are there any discussions on the benefit of including (in om/root) all components but using display:none to hide the deselected ones over only including the current component? There are obvious benefits in terms of UI state like scrolling position being preserved when using display:none but are there any performance considerations? If only emitting the components being used then the om lifecycle events are very useful for hooking in to to update the app-state for example so app-state can only represent the current working set if that is what you want. If it helps the app will only show maybe 10% of the components at any one time. At the moment, in IE8, using the above approach (of decorating the cursor) to select a row takes about a second on a table with 100 rows in it :(. It also takes a few seconds to draw the whole table when changing pages. I haven't profiled it yet using show/hide. Hope that makes sense and 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 to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
