I’ve got a data-flow architecture question about Om/React. This isn’t quite what my app does, but it’s close enough and an example most people should be familiar with.
Suppose I’m building an RSS reader. A pane on the left shows each of my feeds and a count of unread items. The main pane shows the items in the selected feed. I don’t want to load the entire world into the client-side app, so the client asks the server for the computed unread counts of the feeds and for a page of items from the selected feed. When the user scrolls down or picks a different feed, it loads more items from the server. When a user marks an item as read (let’s they have to do it manually), I want the unread count for the feed to reflect that. Somehow, I want the fact of my reading the feed item to be sent to the server and I want the new calculated unread count to be reflected back to the client. I’m a bit lost for a good pattern for this. Marking the item itself as read in the app state is easy with cursors, and sending that fact to the server is pretty straightforward with either core.async or :tx-listen. But how do I push the new unread count to the feed list? There are SSE- and WebSocket-type approaches to this, but they seem like overkill. Any thoughts? Peter -- Visuals: http://youtube.com/peeja Words: http://blog.peeja.com/ Conversation: (603) 548-1203 -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
