Skip to content

Filter attrs with @emotion/is-prop-valid - #2133

Merged
quantizor merged 7 commits into
masterfrom
fix-rendering-non-html-props
Oct 25, 2018
Merged

quantizor merged 7 commits into
masterfrom
fix-rendering-non-html-props

Conversation

@Fer0x

@Fer0x Fer0x commented Oct 21, 2018

Copy link
Copy Markdown
Contributor

Just quick fix of #2131


const propsForElement: Object = { ...this.attrs };
const propsForElement: Object = {};
const computedProps: Object = { ...this.attrs, ...this.props };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a way to avoid the second object allocation? This is a hot code path so if we can eliminate it, that'd be good.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@probablyup Generally we can write merged props to propsForElement and filter them in following loop.

@quantizor
quantizor merged commit 772e704 into master Oct 25, 2018
@quantizor
quantizor deleted the fix-rendering-non-html-props branch October 25, 2018 18:35
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