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
2020-05-27T09:07:55.140900Z

Ok, I realized that :class-properties seem to set like static class level fields, so it'll be shared between multiple instance of a component. For ref that was weird, so this is how to do refs with class based components:

(rum/defcs MyComponent <
  {:will-mount #(-> % (assoc ::some-ref (rum/create-ref)))
   :did-mount
   (fn[state]
     (.scrollIntoView (rum/deref (::some-ref state)))
     state)}
  [state]
  [:div {:ref (::some-ref state)}])

levitanong 2020-05-31T18:52:55.141600Z

I think you meant (::some-ref state) 😄 in [:div {:ref (:some-ref)}])

2020-05-31T19:07:43.141900Z

Oh yup, I did. Will fix.