Clojurians
#om
<
2017-03-27
>

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

petterik01:03:10

@sova Which om.next version are you on? There was one SSR fix that had to do with html-escaping the :style map (css values). React usually says exactly where the checksum missmatches. What does your error say?

anmonteiro01:03:11

Server-side rendering (with checksums getting picked up) has been fairly stable since September when Cellophane was merged in Om Next

anmonteiro01:03:29

AFAIK there have been like 2 or 3 fixes to SSR since then

mping10:03:57

is there a reference frontend/backend om.next app? something I could use to learn om.next?

mping10:03:07

ideally with SSR, backend api, etc

baptiste-from-paris10:03:09

@mping you have todomvc by David Nolen if I remember well

mping10:03:58

@baptiste-from-paris is that for om.next? also dont think there is backend involved

baptiste-from-paris10:03:35

with a datomic back-end

baptiste-from-paris10:03:53

you also have some nice tutos by the untangled team

baptiste-from-paris10:03:01

it’s about untangled but it can help you understand om.next

emiluren11:03:52

Is there a "proper way" to deal with state that isn't in your app-state map in Om? I'm making a simple music player with Om.next and howler.js. To play/pause audio and so on I need to call methods on js objects. Right now I'm just calling them from action thunks in my mutate function but I don't know if there's a better way to do it since I guess you lose stuff like going back in history.

danielstockton11:03:47

@emiluren Is there no way to make everything completely deterministic?

danielstockton11:03:13

Here's a general question to the channel: I have a :start and :end on my app-state that determines the time period for all reports and I have a problem getting the right follow-on reads to run, every time I change them. All these reads are in the :reports/ namespace. Do you think it's a good idea to read the current root query, transform it to ast, extract all the :reports/ keys and add those as trailing reads to the transact which updates start/end?

emiluren11:03:43

@danielstockton I don't know. Maybe I could make some sort of data format that describes the state of an audio object and make sure it is in that state in my render function or something but it feels hacky and hard to get right

danielstockton11:03:08

@emiluren render or other lifecycle methods. Anyway, I think that's what you'd have to do or else accept that some things are outside of deterministic history.

danielstockton11:03:40

In order for you to retain proper history, you'd have to do this one way or another.

emiluren11:03:59

Ok, thank you for your help :slightly_smiling_face:

danielstockton11:03:16

The other way I can think to do this is to define all the report reads in one place, define which are acceptible for a given route, and then check the route before firing off requests in my parsers.

danielstockton11:03:31

That might be simpler actually.

anmonteiro14:03:38

@mping same version of todomvc but with SSR https://github.com/anmonteiro/om-next-fullstack

peeja16:03:59

@emiluren That actually sounds best and not hacky at all to me. I mean, you'll probably need to do a little fudging to make it work with an external object that's changing state in real time, so there may be some hacks there, but the approach in general sounds to me like the right application of React principles.

gardnervickers17:03:24

@anmonteiro We started using plomber for our dev build and would love to have it published at some point. Totally understandable if you don’t want to have to maintain that, just mentioning because I saw there’s a note about it in the README :smile:

anmonteiro17:03:20

@gardnervickers :slightly_smiling_face: I just didn’t publish it because I thought nobody would use it

anmonteiro17:03:42

also the name was a stupid pun at the time

gardnervickers17:03:02

It’s proved very useful for tracking down problems where pathopt fails and triggers a root render.

anmonteiro17:03:09

oh wth, I even have docs for it

anmonteiro17:03:21

I don’t remember this being in such a good state

anmonteiro17:03:25

cutting a release now

anmonteiro17:03:08

I wonder how you found it though

anmonteiro17:03:24

I never really advertised Plomber :slightly_smiling_face:

gardnervickers19:03:17

@anmonteiro I was looking through Compassus a while back and must have stumbled upon it somehow and it’s stuck in my brain :smile:

gardnervickers19:03:34

Does the presence of a link in a query have an effect on if a component can utilize path optimization?