Skip to content

Conversation

@Kikobeats
Copy link

@Kikobeats Kikobeats commented Aug 28, 2022

It has been cloned previously before calling onClick function

options
} = this.props;

const elem = React.Children.only(children);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method does not clone element

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, but it isn't need necessary either

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It ensures we pick only one element and children contain only one element

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants