Fork me on GitHub

does untangled-websockets work with the new, modular untangled-server?


@ianchow Sure. You just have to work the server-side handler into the stack.


@cjmurphy Hm. I’ll pull it down and take a look.


@cjmurphy So, I never got the error you described, but I first made sure the projects deps were clean. There were some problems there. Then, there were some render issues, but everything in the console was clean.


I’m double-checking my fixes to the re-render, but I think your problems were largely project-file based


I’ll send you a PR with the patch in a few mins


So, I think there is a bug in Om. If you try to trigger a re-render on root with a property keyword it doesn’t seem to re-render, though if you use a keyword from a join it is fine.


So, the main thing I did was change the follow-on read where edit is transacted to use :main-ui-router as the follow-on read, and that seems to fix it.


Also, there should not be a need for adding lag where you were adding it


PR with comments, if anyone else is interested.


Thanks a lot simple_smile


Hello I working through the youtube videos and currently on the server components. When I reload the page the local-app-state tells me

{:items/by-id { {}},
 :ui/locale "en-US", #{:items/by-id},
 :list [:lists/by-title "Initial List"],
 :untangled/loads-in-progress #{}, [],
 :ui/loading-data false,
 {"Initial List"
  {:title "Initial List",
   :ui/new-item-label "",
   :items [:items/by-id]}}}


Is it caused by the empty atom, which is initialized at the start?


Ah found it. I had made an atom with a map and not a vector


@cjmurphy see discussion in #om I just had. I forgot that the follow-on read causes the query to get focused, and since that kw (:ui/react-key) wasn’t changed, the refresh got optimized away.


follow-on reads do two things: look up the components to refresh, AND narrow the re-query to just the things you’ve indicated. If those things don’t change, then no refresh is done (because Om thinks there is nothing to do).


I was (mistakenly) thinking that the narrowing was to the component, but I guess it is all the way down to the specific item in the (sub)query.


I wonder if there is there any way to by-pass the first part (index lookup) by using an ident/s as the follow on read? I'm saying that because in the past I've had success with using idents for follow on reads. Also (maybe related), is it always the case that something somewhere needs to have changed for a follow on read to re-render?