Skip to content

Instantly share code, notes, and snippets.

@richleach
Created April 21, 2021 21:17
Show Gist options
  • Save richleach/0752b87b7b260dfb5cdb109997c0033e to your computer and use it in GitHub Desktop.
Save richleach/0752b87b7b260dfb5cdb109997c0033e to your computer and use it in GitHub Desktop.
Footer.js in action (display current date dynamically in Javascript (React)
function getYear() {
return new Date().getFullYear()
}
function Footer() {
return (
<footer className="footer bg-dark py-1 text-center">
Copyright &copy; {getYear()} richleach.com. All Rights Reserved. Please don't steal my stuff.
</footer>
)
}
export default Footer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment