Fork me on GitHub
#om
<
2017-11-29
>
roti16:11:40

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

roti16:11:41

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)

qqq16:11:42

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

qqq16:11:52

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

sundarj17:11:52

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

sundarj17:11:44

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

snichme17:11:26

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

roti17:11:39

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

roti17:11:02

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!")))))

snichme17:11:36

Recognize this issue, but cant remember the solution

dyba22:11:03

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

dyba22:11:17

Here is a link to a GIF screencapture of the problem

dyba23:11:35

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.