This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-08
Channels
- # announcements (2)
- # beginners (75)
- # cider (2)
- # clj-kondo (8)
- # cljs-dev (4)
- # clojure (69)
- # clojure-europe (4)
- # clojure-nl (6)
- # clojure-uk (1)
- # clojurescript (17)
- # clojureverse-ops (1)
- # cursive (7)
- # lsp (7)
- # malli (10)
- # missionary (2)
- # off-topic (16)
- # pathom (4)
- # polylith (5)
- # portkey (1)
- # reitit (4)
- # rewrite-clj (1)
- # shadow-cljs (5)
- # spacemacs (3)
- # specter (3)
- # xtdb (14)
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… https://greensock.com/
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?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 https://github.com/metasoarous/oz 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 https://formidable.com/open-source/victory/ but these charts often require specifying react components from within its props, which was causing compiling errors with clojurescript. I also tried https://recharts.org/en-US/, 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!!
I use recharts
in this project https://github.com/lipas-liikuntapaikat/lipas/blob/master/webapp/src/cljs/lipas/ui/charts.cljs