Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.0 styled(Component) not returning component #2143

Closed
seanemmer opened this issue Oct 23, 2018 · 1 comment
Closed

4.0 styled(Component) not returning component #2143

seanemmer opened this issue Oct 23, 2018 · 1 comment

Comments

@seanemmer
Copy link

Since upgrading to 4.0 styled(Component) no longer returns a react component, but instead returns an object literal:

import * as React from 'react'
import styled from 'styledComponents'

import { LauncherContainer, WindowContainer } from 'components'
import { Flex } from 'components/_utility'

export interface Props {
  className?: string,
}

const Component = ({ className }: Props) => (
  <div className={className} >
    <Flex column alignItems='flex-end'>
      <WindowContainer />
      <LauncherContainer />
    </Flex>
  </div>
)

export const FrameDisplay = styled(Component)`
  background-color: red;
`

Error:

image

@quantizor
Copy link
Contributor

Dup of #2106. You'll need to hold off on your 4.0 upgrade until react-redux supports React.forwardRef.

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

No branches or pull requests

2 participants