Skip to content

Ramitos attrs with style - #636

Closed
geelen wants to merge 6 commits into
v2from
ramitos-attrs-with-style
Closed

geelen wants to merge 6 commits into
v2from
ramitos-attrs-with-style

Conversation

@geelen

@geelen geelen commented Apr 1, 2017

Copy link
Copy Markdown
Member

Updating #509 against current v2.

Comment thread src/constructors/css.js
)
export default (strings: Array<string>, ...interpolations: Array<Interpolation>): RuleSet => {
const rules = flatten(interleave(strings, interpolations))
rules.isStyledBlock = true

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@ramitos this is where the flow error is happening. I'm not 100% sure why you need to do this though?

Comment thread src/models/StyledComponent.js Outdated
}

if (!this.attrs[name].isStyledBlock) {
return styles

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@ramitos can you explain why this needs to be handled differently here? Shouldn't it just be able to come through as an array?

@mxstbr-bot

mxstbr-bot commented Apr 1, 2017 •

Copy link
Copy Markdown
Warnings
⚠️ There are library changes, but not tests. That's OK as long as you're refactoring existing code

Generated by 🚫 dangerJS

Comment thread src/constructors/css.js
export default (strings: Array<string>, ...interpolations: Array<Interpolation>): RuleSet => {
const rules = flatten(interleave(strings, interpolations))
// $FlowFixMe
rules.isStyledBlock = true

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't really like this ☹️ Isn't this also going to break v8 optimisation?

@kitten

kitten commented Apr 1, 2017

Copy link
Copy Markdown
Member

I don't really see why this should be this entangled with the "main" API. 😢 Isn't there a way to make this more separate?

@mxstbr

mxstbr commented Dec 15, 2017

Copy link
Copy Markdown
Member

Since there's been no work on this for ages, I'm going to close it out.

@mxstbr mxstbr closed this Dec 15, 2017
@quantizor
quantizor deleted the ramitos-attrs-with-style branch January 13, 2020 18:10
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.

5 participants