The event-id can be any Clojure value. When you fire an event, you need to make sure that there is enough information in this value to properly dispatch to a reactor.
react-to takes an event predicate function which is called with the event-id. If the function returns true then the reactor will handle the event. So, as you say, you would need to have a distinguishing id so that this event predicate function can determine if it should react. As David and Fogus point out, this is very slow at the moment. The interesting question is: can we have the flexibility of arbitrary event-ids and event predicate functions and make it fast? On Jan 17, 10:08 pm, kovas boguta <kovas.bog...@gmail.com> wrote: > Pretty basic question here. > > Suppose I want to have 2 copies of the form in the same application. > > How will the event handlers know which form the events are coming > from, and which form needs to be modified in response to those events? > > More generally, what if I have N copies of some widget that all have > the same structure, but different instance data. For example, a list > of tweets, where each tweet has "favorite" button. > > My current impression is that I'd have to architect the event routing > myself, making sure some distinguishing ID is carried around > throughout. > > Is this accurate? > > What is the recommended way to handle this situation? > > Thanks, > Kovas -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en