Created
December 11, 2019 21:46
-
-
Save marco-souza/92ef7827579e7c0034e0bd40e72bd5cb to your computer and use it in GitHub Desktop.
concatReactComponent
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
const concatComponents = (...listComponents) => listComponents | |
const MyComp = (props) => { | |
const myConcatenatedText = concatComponents( | |
'My text with ', | |
<a>My link</a>, | |
'end of my text with', | |
) | |
return ( | |
<p>{myConcatenatedText}</p> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment