reagent

A minimalistic ClojureScript interface to React.js http://reagent-project.github.io/
2020-06-28T06:48:09.277400Z

@neural.works.com I'm confused by the question. By "very first value of my ratom" • I assume you mean the ratom c in doit • if so, do you mean you want the value in c before the swap! in btn ?

neural 2020-06-28T16:20:39.280800Z

@mikethompson Hi Mike sorry about the confusion!! you are right how i get the value o 'c' before the swap! ?

whoops 2020-06-28T21:15:38.283400Z

@neural.works.com You can't. Once the swap happens it's swapped. The old value isn't retained. You need to store it elsewhere and not update it. Something like

(let [init 0
      c (r/atom init)]