Clojurians
# om

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

ag 02:16:46

is it ok/possible to call/transact a mutate method from another mutate method? Let’s say I have defmethod mutate set-a-thing! and then I have defmethod mutate set-many-things!. Can I execute first one multiple times from the second one?

drcode 04:54:22

@ag seems like that would be fine, I think I do that in a couple of cases

drcode 05:05:11

My own question: I'm still trying to wrap my head around the uses of Ident declarations... if an app is not using normalization, there's still a benefit to declaring Idents to optimize rendering, is that right? Is there any good resource that explains this? (or maybe just a section of the OmNext source code that I should grok to understand this better?)

sova 05:35:54

@drcode i give everything an ident whether i use it that way or not... not sure if that's the best way, but is clearest

hlolli 18:11:33

@tony.kay an open question (as in anyone can answer) about the much use of factories https://www.youtube.com/watch?v=uxI2XVgdDBU&t=22m01s here on line 52, looks as if each list item in a dropdown menu is an react component on its own. Just a stylistic question rather, what are to pros of mapping data to a component that does not much else than render, vs just map the data within a render method of a component. My projects tend to be few massive defui, I wonder what is more readable, maintainable etc... Ps the defmutation macro is very sweet!

tony.kay 19:57:00

@hlolli: you're often better off in the case I'm showing there with just a function unless there's some need to do mutations on the items, or you want to share them. I split them there more out of habit than necessity. If your query gets too hairy you can experience performance problems.

tony.kay 19:59:04

Either way it's easy to convert back and forth as the need arises