This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-11-01
Channels
just wrote a hello world for remotes https://github.com/jdubie/om-next-starter. largely based on https://github.com/swannodette/om-next-demo.
was surprised i had to override merge-tree
to get this simple app to work https://github.com/jdubie/om-next-starter/blob/master/src/om_starter/core.cljs#L47. @dnolen why did you choose this as the default implementation? https://github.com/omcljs/om/blob/master/src/main/om/next.cljs#L1232
@jdubie no particular reason other than it’s simple. it shouldn’t be at all surprising that you should have to override it.
@jdubie: once you starting thinking about property deletion etc. there’s no good choice but the one that works for your app.
might revisit, but would rather get a lot more feedback about how people implement :merge-tree
before deciding anything.
i’m coming from a world were i make an RPC and then have logic based on status code (show error / on to next state). how should i think about handling remote mutation errors? om next is great for maintaining consistency by reading modified keys afterward. however, not sure cleanest way to get a message on why it failed back from server
it’s also the case that if you do a lot of optimistic updating, :merge-tree
might not be something you even care about
and Om Next will just get out of the way and provide tools to solve it however you want
some apps may want to fail entire responses, others may want something more fine grained
I can't wait to wire up my kanban demo with a real backend, I'm eager to try the remote story
@jdubie: hopefully things are flexible enough that people can provide typical forms of error handling error patterns as a kind of middle ware (or standard reconciler customization)
Yay. It may not be pretty, but I'm working on a generic (horizontal) Om Next list component that allows DND reordering, can handle arbitrary sequential input data and doesn't restrict what elements are used for the reorderable children (well, for the most part): https://github.com/Jannis/om-next-kanban-demo/blob/master/src/kanban/components/sortable_list.cljs Usage here: https://github.com/Jannis/om-next-kanban-demo/blob/master/src/kanban/components/board_dialog.cljs#L44 Example: http://jannis.github.io/om-next-kanban-demo/ -> Boards -> Development -> Edit -> Reorder lanes via DND
@dnolen: Typo "Defualts" at https://github.com/omcljs/om/blob/master/src%2Fmain%2Fom%2Fnext.cljs#L1219
@jannis: Thanks for the kanban demo. Great for a starter.
Anyone know what cb
stands for here in David Nolen’s om-next-demo? https://github.com/swannodette/om-next-demo/blob/master/todomvc/src/cljs/todomvc/util.cljs#L18 I know it’s the function that you call to merge new server state.
It's callback
@jdubie an possible enhancement for om-next-starter, here’s how I am logging exceptions https://gist.github.com/stevebuik/f97901dda45926313e1c
I’m not claiming elegance but it’s useful for folks starting to see how exceptions are surfaced