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

FeaturedBadge: Move styled outside of the render function #35

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

paulathevalley
Copy link

👋

This PR resolves the following console warning for the <FeaturedBage> component:

The component Styled(Component) with the id of "sc-fzqAui" has been created dynamically.
You may see this warning because you've called styled inside another component.
To resolve this only create new StyledComponents outside of any render method and function component. 

This PR:

  • Move styled outside of the render function
  • Pass the Logo component as a tagName prop, so the badge can be rendered without passing isHoverable to the DOM. This approach can be revisited once styled-components is upgraded to at least v5.1.0.

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