om

Please ask the channel first, not @dnolen directly!
sova-soars-the-sora 2017-03-30T16:07:48.932732Z

Hi Everyone! Happy #\Clojurewest!

sova-soars-the-sora 2017-03-30T16:09:28.970231Z

I have a collection of submissions and I want to re-arrange their order of display on the page.

sova-soars-the-sora 2017-03-30T16:09:56.980658Z

I have an action that should sort them, but when I do (take 8 ~) of my collection, I get the same 8 everytime

sova-soars-the-sora 2017-03-30T16:10:20.990078Z

they live in an atom

sova-soars-the-sora 2017-03-30T16:10:38.996991Z

thoughts?

sova-soars-the-sora 2017-03-30T16:11:28.015710Z

so far my best guess is: maybe my sort is not doing what I think it's doing

sova-soars-the-sora 2017-03-30T16:12:28.038535Z

(swap! nf-app-state-atom update :blurbs #(sort-by :number-of-ratings %))

sova-soars-the-sora 2017-03-30T16:17:04.142604Z

Hrm. Maybe it's because the invokation happens before the atom is populated with info.

sova-soars-the-sora 2017-03-30T16:23:53.295220Z

Okay, that appears to have been the issue.

sova-soars-the-sora 2017-03-30T16:24:16.303823Z

Ah, that's the magic of the react lifecycle methods. sort the data to your liking on different lifecycle events....

sova-soars-the-sora 2017-03-30T16:24:26.307429Z

like component will render or whatever

baptiste-from-paris 2017-03-30T20:44:54.902849Z

hello guys, any feedbacks on how to handle routing server-side for om application ? (for example, I want to access the article /news/my-front-route/om-is-awesome