Fork me on GitHub

anyone sitting on some nice solutions for doing animations/transitions in ClojureScript? I'm using Reagent but wouldn't be afraid of using something that manipulates the DOM/CSS directly if needed (if the animation API is nice enough)


(not infinitely free, check pricing) These are from the react universe @victorbjelkholm429 Id actually love to see if there is something similar or a wrapper to react spring in cljs.


thanks @alpox! What I was looking for actually is something more "zoomed out" in terms of managing the animation state, more focused on the architecture with good support for animations, rather than specific libraries/methods like that. Most React wrappers (like these ones) seems to rely on wrapping the components that are being animated in some parent component, something that never felt like a good solution to me, looking to see if there is any alternatives for a overall architecture for animations spread throughout


That is only what framer motion does though - which is also why I prefer react spring. It uses react hooks for the animation. The animation itself circumvents react entirely and does direct DOM manipulation. You might be able to write something that goes a similar way for Reagent


you can use gsap, i create a map of different timelines with different animations and the use them on some user event or component-did-mount/useEffect…


Given that I have:

(let [all (.-all js/Promise)] ...)
how do I invoke all on an array, like in (js/Promise.all (into-array [])). Is this possible?


I probably need .bind or something here right?


(.all js/Promise (apply array promises))


but if you already have all in that let


((.bind all js/Promise) (apply array ...))


Do y'all have recommendations for clojurescript data visualization libraries? For context, I am building a reframe application that I want to have pretty simple charts within (e.g. a stacked bar chart with tooltip on hover). I would like the charts to look pretty on a phone or desktop. I tried and loved the ease in creating a chart, but it doesn't seem very customizable, or pleasant on a phone. I also tried porting a couple react chart libraries into clojurescript, but may not be smart enough for that yet. I had the best luck with but these charts often require specifying react components from within its props, which was causing compiling errors with clojurescript. I also tried, but was getting error messages i couldn't parse at all.


I am still newish to clojure(script), and using this personal project to build up my understanding, but to be honest I've hit a frustration wall. It feels like a pretzel logic of interops (reagent converted to react component library converted to react converted to d3), which makes error handling extremely hard. It also feels like I am now just writing javascript in a clojure flavour, but not getting the benefit of either language. I am wondering if it would be better to scrap the project and write it in straight JS.


Would anyone have recs for data visualization, or could point to a repo where they used re-frame and graphs? I can definitely learn from source code, but having terrible luck finding any cljs graphing examples. Thank you!!


Maybe the components near the end of the file are the best to look at.


Ah, awesome, thank you Valtteri. I'll take a look!


No problem. 🙂 Let me know if you have any further questions