This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-20
Channels
- # aws (1)
- # beginners (14)
- # boot (30)
- # cider (6)
- # clara (9)
- # cljsjs (3)
- # cljsrn (22)
- # clojure (247)
- # clojure-dusseldorf (75)
- # clojure-france (38)
- # clojure-italy (6)
- # clojure-japan (8)
- # clojure-nl (3)
- # clojure-russia (16)
- # clojure-serbia (4)
- # clojure-spec (1)
- # clojure-uk (53)
- # clojurescript (168)
- # consulting (3)
- # copenhagen-clojurians (1)
- # core-async (7)
- # css (1)
- # datascript (3)
- # datomic (8)
- # dirac (22)
- # events (1)
- # hoplon (2)
- # jobs (1)
- # jobs-discuss (2)
- # leiningen (4)
- # lumo (138)
- # mount (13)
- # nyc (1)
- # off-topic (24)
- # om (34)
- # onyx (15)
- # pedestal (30)
- # re-frame (9)
- # reagent (23)
- # ring (1)
- # ring-swagger (24)
- # rum (6)
- # spacemacs (6)
- # specter (51)
- # uncomplicate (14)
- # unrepl (1)
- # untangled (17)
- # yada (12)
the problem I have now is this: I receive a javascript File
as an argument and try to do (.readAsDataURL (js/FileReader.) %)
where % is an instance of File. I get nil 😕
@tomaas I create my own realization of dropzone, which is implementation of react-dropzone
in cljs) If you want I can share code
@savelichalex of course, thank you
@tomaas https://github.com/savelichalex/Souptitle/blob/master/apps/desktop/src_front/souptitle_desktop/common/components/dropzone.cljs
Hi everyone. Using reagent to render an SVG circle, storing its center (cx) position inside a ratom. When cx changes, does this mean that reagent will delete the old circle and insert a new one at the new position? If so, is there a way to prevent this overwork (assuming it is more work than just moving the circle to its new position)?
I guess I could find my answer by making a custom reagent component and checking how often it is unmounted.
if it remains the same component, reagent knows it doesn’t need to destroy it, since it is parameterized by the ratom, reagent knows to re-render when the ratom changes
this is no different between svg or div
<thinking>
so there would be no component-did-unmount call, correct?
as I understand it that is correct
okay thanks. Was asking because am doing SVG renderer tests for a physics lib (planck.js)’s bodies and performance seemed a bit… “flickery”. Not sure yet, though. Thanks again. Will push things (more bodies) a bit to see how well it holds.
if you have a list of svgs, you should use the ^:id
metadata so it can optimize the re-render as the data changes
but it should warn you about this in the console too
Only one svg but there will up to 100 circles bumping about, ideally 60 times per second.
I could do that…. giving each one a unique id.
Yep. Thx!