reagent

A minimalistic ClojureScript interface to React.js http://reagent-project.github.io/
llsouder 2020-07-10T13:18:16.337100Z

I have reagent/atom with a vector of maps. The atom is populated viajson/transit, websocket::onMessage using reset! each time, I create an html table with the atom. The table updates when I add to the vector but it does not work if I update a map in the vector. In fact, even when I add to the vector, the table cells only update if I refresh the page.

p-himik 2020-07-10T13:24:45.338700Z

Need a minimal reproducible example.

2020-07-10T16:05:16.340400Z

I have a sort of general component design question. I'm thinking about writing a color picker - how would you typically return the chosen values? The obvious answers to me seem to be either pass a cursor to the component, or you provide it with some callbacks. I've mostly gone with something like cursors before, but if I want things to "happen" (like sending data to a server), would you just go with callbacks?

athomasoriginal 2020-07-11T17:35:58.342600Z

My starting position would be callbacks. Just see how that turns out for you, and if you need, you can move to more interesting mechanisms for accessing state.

llsouder 2020-07-10T23:23:10.341100Z

Thanks. While making an example I found my issue. Creating a table from a vec of maps works just like like it should. My issue is a bug in the code I wrote. My table cells are input boxes and those need some work then thing should be better. thanks again!e

👍 1