Skip to content

Use createElement directly in dev - #19

Closed
mxstbr wants to merge 2 commits into
masterfrom
createElement
Closed

mxstbr wants to merge 2 commits into
masterfrom
createElement

Conversation

@mxstbr

@mxstbr mxstbr commented Sep 13, 2016

Copy link
Copy Markdown
Member

Closes #7

THIS SHOULD NOT BE MERGED

This is very inconsistent behaviour. This will work in dev:

const Component = (props) => {
  return styled.div`
    background-color: ${props.bg};
  `;
}

But it will break in production because we're returning a stateless functional component

Imo this is the wrong solution, we cannot ship like this. Let's revert b2cc50d and just add the option to tell us that you're using SSR, in which case the behaviour changes consistently for both prod and dev, and you'll just have to live with wrapper components.

@mxstbr

mxstbr commented Sep 13, 2016

Copy link
Copy Markdown
Member Author

Closing since this is a bad idea. See #23 for some further dev.

@mxstbr mxstbr closed this Sep 13, 2016
@mxstbr
mxstbr deleted the createElement branch September 13, 2016 22:51
@geelen geelen mentioned this pull request Sep 14, 2016
k15a pushed a commit that referenced this pull request May 28, 2017
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.

1 participant