Clojurians
# om

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

alex-glv 00:00:29

I have been working my way through how om.next works and implementing routing similar to compassus, however I am struggling with what happens after I change the route. Basically, I use first approach in this post -> https://anmonteiro.com/2016/02/routing-in-om-next-a-catalog-of-approaches/ , where my Root component contains queries for all routes. Initial dispatch works well, my :remote is requested and response displayed. However, after change-route! remote is not requested anymore. I assume it’s because change-route! didn’t actually touch buried keys inside. How would I force reconciler to execute query of the chosen corresponding route?

alex-glv 00:14:42

I assumed just returning {:remote true} from read would be enough to force data fetching (without :value). Is it correct?

tony.kay 01:11:03

If anyone is interested, Ethan and I beefed up the documented story of how Untangled implements Om Next networking and avoids having you write a parser. Even if you don’t want to use Untangled, this covers some of the core realizations and decisions we think make using Om Next much easier. It also gives you a good idea of what the trade-offs are:

http://untangled-web.github.io/untangled/tutorial.html#!/untangled_tutorial.H_Server_Interactions

wilkerlucio 16:08:56

thanks for that, reading this page was very enlightening

rackdon 17:08:43

I need a library for manage routes management. I’ve seen Secretary and Bidi. What do you think is better?

alex-glv 17:25:37

In om.next, what’s the difference between query and query expression?

alex-glv 20:02:22

Hmm, any hints why after re-reading keys :ast doesn’t have :query anymore? (om/transact! reconciler ‘[:board/list]) [..logs] ast {:type :prop, :dispatch-key :board/list, :key [:board/list]}

Essentially sends empty route to the back-end.. Can’t quite figure it out.

alex-glv 20:13:50

As opposed to initial rendering, (say on page reload) ast {:type :join, :dispatch-key :board/list, :key :board/list, :query [:db/id :board/name :board/description], :component boards-io.components/BoardItem, :children [{:type :prop, :dispatch-key :db/id, :key :db/id} {:type :prop, :dispatch-key :board/name, :key :board/name} {:type :prop, :dispatch-key :board/description, :key :board/description}]}