om

Please ask the channel first, not @dnolen directly!
roti 2017-11-29T16:11:40.000566Z

Hi, I'm having a problem which drives me crazy. 🙂 Namely my view is not beeing rendered at all as soon as the root comonent implements om/IQuery, and I can't figure out why

roti 2017-11-29T16:12:41.000448Z

when I comment the IQuery part, everything is ok, but as soon as I put it back, my view is not rendered at all (with no errors & co)

qqq 2017-11-29T16:32:42.000489Z

does om/next use a graph database for storing everything?

qqq 2017-11-29T16:32:52.000788Z

I'm trying to understand how this whole 'flattening' process works

2017-11-29T17:23:26.000528Z

@roti just a check, do you have Object before (render)?

sundarj 2017-11-29T17:40:52.000334Z

yes, everything (except computed data like callbacks, and React local state) is stored in the graph db and normalized with the help of Ident metadata that you provide on components

roti 2017-11-29T17:41:39.000318Z

@snichme yes, I have. everything works fine until I make my component implement om/IQuery

sundarj 2017-11-29T17:41:44.000210Z

check out the Om Wiki and Fulcro devguide for a fuller picture

roti 2017-11-29T17:42:02.000502Z

here's the core

(defui RootView
  ;static om/IQuery
  ;(query [this]
  ;  [:count])
  Object
  (render [this]
    (let [{:keys [count]} (om/props this)]
      ;(println "Rendering counter, count=" count)
      (dom/div nil
               (dom/span nil (str "Count: " count))
               (dom/button
                 #js {:onClick
                      (fn [e] (om/transact! this '[(increment)]))}
                 "Click me!")))))

2017-11-29T17:56:36.000044Z

Recognize this issue, but cant remember the solution

dyba 2017-11-29T22:58:03.000531Z

I’m having an issue where the state of the app is being overwritten it seems

dyba 2017-11-29T22:58:05.000624Z

http://recordit.co/AR3PjmRsLJ

dyba 2017-11-29T22:58:17.000321Z

Here is a link to a GIF screencapture of the problem

dyba 2017-11-29T23:01:35.000359Z

it’s loading the data from the server and populating the values into the drop down menus; but the data doesn’t stick around for the first drop down menu.