rum

Simple, decomplected, isomorphic HTML UI library for Clojure and ClojureScript | 0.12.8 https://github.com/tonsky/rum/blob/gh-pages/CHANGELOG.md#0128
2018-01-15T12:43:34.000009Z

is there an large open source webapp in using rum? I'd like to study how people write larger apps with rum

rauh 2018-01-15T13:00:06.000364Z

@chrisblom https://github.com/uxbox/uxbox

❤️ 1
2018-01-15T13:00:44.000481Z

thank you

2018-01-15T14:44:58.000365Z

i have a component that sets the select tag value based on the value of and atom, I'm using rum/react & rum/reactive, but sometimes the element does not update

2018-01-15T14:45:42.000092Z

i remember when working with om that there was some workaround needed to update certain input elements, is that the case with rum as well?

2018-01-15T14:46:26.000356Z

(rum/defc select < rum/reactive [cursor {:keys [options label]}]
  [:.form-group
   [:label label]
   (into [:select.form-control
          {:value (or (rum/react cursor) "")
           :on-change (fn [dom-event] (reset! cursor (read-string (.. dom-event -target -value))))}]
         (for [ [i o] (map vector (range) options)]
           [:option {:value (pr-str o)} (name o)]))])

justinlee 2018-01-15T16:27:32.000302Z

@chrisblom so you are saying that if you log the (read-string... form you’ll receive events that are sometimes not reflected in the ui?

justinlee 2018-01-15T16:29:39.000351Z

generally both om and rum have a common problem, which is that because they batch updates, on-change events can get swallowed and cause other kinds of re-renders. supposedly the sablono library that they both rely upon fixes this problem but maybe you found another issue?

2018-01-16T16:36:08.000668Z

@chrisblom I've come across this issue too i think. My solution was to not re-render the select, but rely on the native state and kept the changed value in some other atom

2018-01-17T08:59:40.000360Z

the problem was the the native state and the atom get out of sync

2018-01-15T22:02:20.000189Z

I'm getting a no such namespace "prum-preact" when trying to use prum. I've tried adding "prum-preact" to :npm-deps, but I'm not having any luck. Any ideas?

2018-01-15T22:02:30.000143Z

:install-deps too. (I'm using boot-cljs, btw)

2018-01-15T22:09:57.000100Z

thanks, the events get swallowed, i've fixed it now by calling rum/request-render

justinlee 2018-01-15T22:14:31.000046Z

@chrisblom if you have a small repro you should really file a bug. that shouldn’t be required

2018-01-15T22:23:00.000363Z

yeah, i'll see if i can make a minimal testcase