-
Notifications
You must be signed in to change notification settings - Fork 33
Fix setProps when IDs aren't provided #166
Conversation
construct paths on-the-fly while recursing through the tree.
addIndex(map)( | ||
(component, i) => createContainer(component, concat(path, ['props', 'children', i])), | ||
components | ||
) : createContainer(components, concat(path, ['props', 'children'])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-🚫 but to my eye ramda makes this much harder to read, vs vanilla
components.map((component, i) =>
createContainer(component, concat(path, ['props', 'children', i]))
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks awesome! This is hardly any extra code, can't imagine it being much of a perf drag - nicely done! 💃
@chriddyp this is awesome (my 💃 stands BTW, despite the extra discussion). But @byronz merged some of the |
Yeah - I think I'll follow up with a PR that cleans up some of the DCC logic. I think that the |
provide valid setProps for all components, even if they don't have an ID construct paths on-the-fly while recursing through the tree.
Fixes #165