Skip to content

Instantly share code, notes, and snippets.

@fatiherdogan01
Last active June 20, 2020 17:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fatiherdogan01/7dad232cddd15e7086669899018a90f9 to your computer and use it in GitHub Desktop.
Save fatiherdogan01/7dad232cddd15e7086669899018a90f9 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 = `${count} kere tıkladınız`;
});
return (
<div>
<p>{count} kere tıkladınız.</p>
<button onClick={() => setCount(count + 1)}>
Click me
</button>
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment