Skip to content

Instantly share code, notes, and snippets.

@BetterProgramming
Created August 2, 2021 15:46
Show Gist options
  • Save BetterProgramming/830a3c1f6887e4b8743a51bf465b349b to your computer and use it in GitHub Desktop.
Save BetterProgramming/830a3c1f6887e4b8743a51bf465b349b to your computer and use it in GitHub Desktop.
import React, {useState, useEffect} from 'react';
function Example() {
const [count, setCount] = useState(0);
useEffect(() => {
document.title = `You clicked ${count} times`;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment