Skip to content

Instantly share code, notes, and snippets.

@marco-souza
Created December 11, 2019 21:46
Show Gist options
  • Save marco-souza/92ef7827579e7c0034e0bd40e72bd5cb to your computer and use it in GitHub Desktop.
Save marco-souza/92ef7827579e7c0034e0bd40e72bd5cb to your computer and use it in GitHub Desktop.
concatReactComponent
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