Fork me on GitHub

Does anyone have a guess on re-frame: no :event handler registered for: undefined error?


It happens when I do a :simple build and seems it is preventing my app from booting up.


Does not happen when I am on the nice and cozy figwheel


maybe you didn't require the events namespace? @iku000888


I’m using re-com and generating input boxes using a map over a collection of labels. But I get a react warning saying Every element in a seq should have a unique :key - I understand why the key is expected. I just don’t know how do I add it using re-com, hiccup etc. Anyone know?


not entirely sure about re-com, but with regular hiccup you can apply key either as metadata on the object or as key in the properties-map of the element


        (for [item @items]
          [:li {:key (item :title)}])]


Hi all, i'm trying to get my head around an issue, it's idiomatic to dispatch an event on a component's :component-will-unmount hook, to catch and save user's work in progress ?


@iperdomo personally I don't think it's a good idea. It ties a side-effecting action to a rendering event. You may not have perfect control over when the comp gets unmounted


a better approach would be to save as a an effect of the user-action, i.e. navigating away


or even better perhaps, to save whenever the user provides new input, rather than magically save when the user dismisses the view


> The broader React community sometimes likes to collocate queries with view components and initiate those queries (via a GET?) within the View's componentDidMount. And then, perhaps cleanup/stop any database polling in the Component's componentWillUnmount. [...] This approach is not idiomatic for re-frame. Views are not imperative (they don't issue database queries), they simply render current application state.


again, many thanks