Last active
February 14, 2019 19:00
-
-
Save franklinjavier/535f602f0129b79c6122daf188e6c29d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Errado | |
// Não queria criar uma tag span desnecessariamente | |
<ProductName> | |
<a href={`${baseUrl}/${product.slugName}`} > | |
<strong dangerouslySetInnerHTML={{__html: product.brand.name}} />{' '} | |
<span dangerouslySetInnerHTML={{__html: product.name}} /> | |
</a> | |
</ProductName> | |
// Correto | |
<ProductName> | |
<a href={`${baseUrl}/${product.slugName}`} > | |
<strong dangerouslySetInnerHTML={{__html: product.brand.name}} />{' '} | |
{dangerouslySetInnerHTML(product.name)} | |
</a> | |
</ProductName> | |
--edit | |
agora daria pra usar <Fragment> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment