Fork me on GitHub
#om
<
2016-10-20
>
sineer15:10:57

Hello! I am currently cloning madvas/todomvc-omnext-datomic-datascript on react native to learn... I am quite far along and loving the experience so far even with the steep learning curve for so many things and quite a few quirks. I have lots of Qs but I'll focus on a few road block I have atm 🙂

sineer15:10:34

I got to the point where my TodoList component render Todo(s) but I have two problems. 1) TodoList first rendering call read (:todo/list) only for local "remote" even too I do return {:remote true}. When I do a mutation like :todos/toggle-all then the parser read is called twice for :todos/list as expected and it fetch "remote" and init my datascript db.. The question is, any idea why the reconciler fetch local "remote" only the first time it read :todos/list instead of also reading from :remote ?

sineer15:10:10

2) I see my components queue! themselves on the reconciler queue for rendering following merge-sends but nothing calls schedule-render! and my component never refresh (reconciler queue is full but nothing happens until I call schedule-render!). Reading the code I see set-state! call schedule-render! but not merge! and such. That leaves me trying to understand what is supposed to do schedule-render! and how come it's not doing it for me?

ethangracer18:10:21

@dnolen @anmonteiro I am pretty sure that I did sign a CA awhile back -- full name is Ethan Gracer, but yeah it's not a critical fix, feel free to merge whenever

dnolen18:10:28

@ethangracer great thanks, I was looking for Navis as the last name sorry

arohner19:10:32

How does OmNext querying interact with user logins? Is it expected that you use queries to do logins? Then once the user is logged in, it’s on me to write the server parser to e.g. grab the user’s session id and combine that with the query data?

jasonjckn20:10:35

@arohner I don't know what other people do, but I didn't use om.next for logins, I did it as middleware to my clojure http server, the om.next app won't load until they're logged in

jasonjckn20:10:55

i keep auth data in session ring middleware

arohner20:10:17

yeah, I’ve used friend with Om now. Wondering if I should stick with it. It looks like I can write a friend workflow that recognizes the Om api & pull out the [(login/username {:params “arohner”}) (login/password {:params “password”})], but it feels slightly hacky and I wasn’t sure if there was a better way

jasonjckn20:10:18

om.next doesn't really have a whole lot to say about server-side besides the language the server should speak (query expressions)

jasonjckn20:10:31

and I see login as server-side problem, so whatever you normally do is fine

ag23:10:37

So, Not too long ago I tried convincing my colleagues to explore Om.Next for our next app, and have given green light. I jumped into these waters practically with zero knowledge of Clojurescript, little of React and just a few months of Clojure. Almost immediately it become obvious - Om.Next offers extremely good capacity and very well thought architecture. However, one thing we didn't know at the beginning - complex dynamic routing is not very trivial and straightforward. I got stuck with this problem. Stuck pretty good. I think the trouble was - I have expected too much from Om.Next. Then I realized - it is a smart layer on top of React, but it's not "magical". Many people suggested - try Untangled. But with given time constrains I never had any chance to look into it, besides - it still unclear if I could solve this particular problem with Untangled. Also other aspects of Om.Next we like very much already, and we're still unsure if we wanted to pull-in another library. Also that's one of those problems incredibly difficult to explain. It's like: - "Oh. shit. I can't drive this convertible" - "What? why can't you? Have you ever driven cars before?" - "I can drive, alright. Just not this convertible. Here, try yourself" - "Oh. hmm, yeah. you right. Something is wrong. Sorry, I didn't believe you at first" Yeah, we needed to build an app with much dynamism and complexity. So anyway long story short. I have just discovered Compassus. I tried creating small app to see how it works. And you know what? It totally simplifies dynamic routing with Om.next. Thank you @anmonteiro Thank you @dnolen and all the people in this channel! You guys are awesome!