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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid create element dynamically #190

Merged
merged 3 commits into from
Feb 7, 2020
Merged

fix: avoid create element dynamically #190

merged 3 commits into from
Feb 7, 2020

Conversation

Kikobeats
Copy link
Member

@Kikobeats Kikobeats commented Feb 7, 2020

so styled-components is showing this warning:

styled-components.browser.esm.js:1347 The component styled.a with the id of "sc-pRtAn" 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

and it's correct, we were creating the element dynamically, so I refactor it to take the advantages of as prop tag 馃檪

@Kikobeats Kikobeats merged commit 9849db7 into master Feb 7, 2020
@Kikobeats Kikobeats deleted the warning branch February 7, 2020 13:00
@Kikobeats Kikobeats restored the warning branch February 7, 2020 13:00
@Kikobeats Kikobeats deleted the warning branch February 7, 2020 13:01
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.

None yet

1 participant