Skip to content

Conversation

FrancescoCioria
Copy link
Contributor

No description provided.

@nemobot nemobot added the WIP label Jan 24, 2019
@nemobot nemobot added in review and removed WIP labels Jan 24, 2019
@FrancescoCioria
Copy link
Contributor Author

@giogonzo React.Children.toArray does exactly what we tried to replicate (with maany bugs)... and it's also typed!

No one reported a bug for the current implementation, but this greatly simplifies the warning logic and it enables TS to be useful.

Copy link
Member

@giogonzo giogonzo left a comment

Choose a reason for hiding this comment

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

Looks 💯

> = React.Children.toArray(this.props.children);

if (!column && hAlignContent === "center") {
const atLeastOneChildHasHMarginAuto = some(children, child => {
Copy link
Member

Choose a reason for hiding this comment

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

not related, and not sure about our current browser support target here, but this could easily be rewritten using Array.prototype.some and maybe drop some kB from the package?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants