# om

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

pedroteixeira 04:43:24

I was wondering if Om.Next would benefit from anything specific in the new React 16 (with fiber, etc)? Has any already tested the alpha?

anmonteiro 04:49:22

@pedroteixeira I tested an early version of Fiber and it works fine with Om Next

anmonteiro 04:49:30

there’s like 1 line of code that needs changing

anmonteiro 04:50:27

not sure we’ll benefit from anything apart from what every other person who’ll switch to it will also get

danielstockton 13:37:45

You might be interested in these read helpers:
``` (defmulti read om/dispatch) (defmulti mutate om/dispatch)

(defn read-join [{:keys [parser query target ast] :as env}] (let [ret (parser env query target)] (if target (when (seq ret) {target (assoc ast :query ret)}) {:value ret})))

(defn read-union [{:keys [query] :as env} union-key] (let [union-query (cond-> query (map? query) (get union-key))] (read-join (assoc env :query union-query))))

(defmethod read :default [{:keys [ast state] :as env} key params] (let [st @state ns (namespace key)] (condp = ns "join" (read-join env) {:value (get st key)})))


danielstockton 13:39:54

It allows queries like [{:join/child (om/get-query Child)}] and you can write the Child query as though it were part of the root query.

danielstockton 13:41:14

It calls the parser recursively, there is some more explanation here:!/om_tutorial.E_State_Reads_and_Parsing