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
sova-soars-the-sora 2019-01-06T18:03:39.014100Z

i'm trying to type into an input field but it's awfully slow

sova-soars-the-sora 2019-01-06T18:03:50.014400Z

i have a feeling the page is re-rendering on every character

sova-soars-the-sora 2019-01-06T18:04:12.014800Z

some component watching an atom that is changing on the user input... and redrawing the whole screen

sova-soars-the-sora 2019-01-06T18:07:46.015100Z

(rum/defc post-comment-input < rum/reactive []
  [:form#postcommentinput
   [:textarea.fullwidth {
                         :placeholder "let us be kind"
                         :on-change (fn [e] (do
                                              (swap! input-state assoc-in [:inputs 0 :comment] (.-value (.-target e)))
                                              ))

sova-soars-the-sora 2019-01-06T18:08:07.015300Z

with :value (get-in @input-state [:inputs 0 :comment])

sova-soars-the-sora 2019-01-06T18:14:45.015700Z

Should i have an entirely separate atom to prevent watch?

sova-soars-the-sora 2019-01-06T20:12:01.016Z

the keyfn was slowing things down

sova-soars-the-sora 2019-01-06T20:35:18.016600Z

and putting the comment input into a separate atom @app-comment solved the issue