Google closure is a treasure-trove of little-known features that are all included with Clojurescript by nature of its using Closure. Never bother with an accordion plugin again.
With reagent and like two-three lines of CSS3 it’s usually so simple for me that I don’t bother using such a native class for it.
Just toggle a class on a container div using a reagent atom for storing state of a section. Use css to animate it downwards and upwards.
having said this: will check out this treasure trove 'cause why not
True – I’ve done that too with an easy Reagent function. I’ve found the writing of those css lines to be annoying, though. Plus, the Google Closure method has support for things like “only one is allowed to be open at once,” plus any other toggle or on-expand logic. Closure will also provide me with things I hadn’t thought of, like the ARIA role. Check it out: