Skip to content

Instantly share code, notes, and snippets.

@neekey
Created April 30, 2021 14:12
Show Gist options
  • Save neekey/e0e2f46e166e7994359ed9277aad8353 to your computer and use it in GitHub Desktop.
Save neekey/e0e2f46e166e7994359ed9277aad8353 to your computer and use it in GitHub Desktop.
[artile-codegist]Why You Should Wrap Your JSX With Parentheses
const homePageLink = currentPage !== 'home' ? (
<a
className="home-page-link"
target="_blank"
href="#home">
Home
</a>
) : null;
const homePageLink = currentPage !== 'home' ? <a
className="home-page-link"
target="_blank"
href="#home">
Home
</a> : null;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment