Fork me on GitHub

@petrus if you really need a particualr component, my suggestion is .... take the CSS from an existing component (assuming licence allows) and then replace the existing js with reagent/cljs. The look and feel of these things is often the challenging bit. The component's actual logic is typically not that hard (ie. the cljs is not that hard). And the existing js implementation acts as a pretty good spec.


Then, when you are done .... donate your component to re-com (assuming MIT licence) simple_smile


i wonder if it's possible to use bits of re-com. for example if i only need a dropdown with filtering. the code seems very modular and nice.


If you do advanced compilation you could just add it? it will remove all non used code anyway


hmm, that's a thought


@shem yeah we went to some trouble to structure re-com so that advanced compilation could do significant dead code elimination


ok, good to know. we want to serve mobile users as well. if we only use certain components from re-com, say dropdowns, would this mean trouble with mobile users?


As we make clear in the re-com readme, we don't do any work with mobile


It probably works just fine, but I wouldn't like to give assurances


You'll have to experiement ... and then report back simple_smile


-------------- While I remember it ... for those that have joined recently ... Here is a useful debugging tip I picked up from @escherize ... When you are debugging a reagent view ... and particularly the value coming through in a cursor or subscription (re-frame) or props ... ... add something like this to the hiccup in your view ... [:pre (with-out-str (pprint @some-ratom))] ;; assuming that @some-ratom is the value you want to observe You don't even have to use pprint, you could just do this: [:pre (pr-str @some-ratom)] If you do use pprint then you'll need to require it in at the top of your view.cljs: [cljs.pprint :refer [pprint]] Further note: the advanced version of this technique is to not use pr-str or pprint but instead to use @yogthos' excellent json-html library: for an even more carefully arranged display.


That is a good one, I do that all the time.