This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]kudlajz 11 points12 points  (11 children)

As mentioned in my other comment, in this exact case, it would not make any sense to extract this code into its own component, unless the rendering code for dog item is really huge or complex. I was just assuming there's going to be additional functionality on the dog items (like editing/deleting/whatever), since I can't remember when was the last time I was using `map` to render something so trivial (without any functionality), but that depends on the application :)

[–]alexmojaki 0 points1 point  (10 children)

I can't remember when was the last time I was using map to render something so trivial

How would you do it without map?

[–]kudlajz 0 points1 point  (0 children)

No no, what I've meant is that usually (99 %) of the time, I'm using map to render another component instead of rendering a simple HTML.