Fork me on GitHub

I am doing (reset! value false) for reagent atom but it is showing me true.


Defined atom as (def value (r/atom false))


@anshbenew need more context. standalone isolated repro


or link to public code


Defined (def is-test (r/atom true)) in reagent and when I try to reset this value it is still showing true.

Ivan Fedorov14:10:12

showing true where? because if it’s in a view – then you may be missing keying aspect of reagent so a more complete ns example is indeed required, as borkdude asked


I understand, but this is not enough information to diagnose your problem. You need to show us your code or an isolated reproduction of your problem.


One problem could for example be that you are using a form-2 component and are dereferencing the atom outside of the returned function. Etc.


Yes, I have two component one is main.cljs and other is form.cljs I have declared my atom in form.cljsas (def is-test (r/atom true)) and then I am setting its value as false from main.cljs but when I am trying to print that value in form.cljs it is printing true only.


Make a single example.cljs file with a stripped down version of your problem and paste it as a

🎯 1
Ivan Fedorov14:10:31

Anyone worked with Vega? Is it possible to snatch out the layout data out of it? Maybe @metasoarous with his wonderful “Oz” knows how. I’m drawing a tree graph, and d3.layout.tree(root).nodes() in the end has the x,y coordinates for where the nodes should be.


Hey @ognivo! You're in luck; I just added a :view-callback option to the oz/vega and oz/vega-lite components, so that you can capture the vega.View object, and use the view api to get at this information.

❤️ 1
Ivan Fedorov11:10:47

whoa, thanks a lot Christopher! in luck indeed


This is admittedly not particularly ergonomic, but I do have plans to add more convenient listener functions so that you don't have to hack around with the view api directly:


It's nice to start with the view api though, since then you get access to everything it has to offer and can "go nuts". But conveniences to boot will be nice.


You can try all of this out on 1.6.0-alpha35


PS There is a #datavis channel should you care to continue discussions over there without cluttering up the #clojurescript channel.


Anyone ever consumed a :target :bundle CLJS lib from TypeScript? Can't seem to figure out how to import it correctly on the TypeScript side.


Are you using shadow-cljs?


The npm-module target might help


I wasn't but concluded that I probably need to be 🙂