Fork me on GitHub
#re-frame
<
2017-10-19
>
iku00088801:10:30

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

iku00088801:10:42

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

iku00088801:10:48

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

pesterhazy10:10:10

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

axl31611:10:08

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?

hkjels11:10:28

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

lovuikeng12:10:52

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

iperdomo13:10:26

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 ?

pesterhazy14:10:50

@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

pesterhazy14:10:16

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

pesterhazy14:10:08

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

iperdomo14:10:44

> 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.

iperdomo14:10:16

again, many thanks