1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-10-23 10:46:13 +02:00

Move useDocumentTitle to hooks

This commit is contained in:
Phuoc Nguyen
2019-11-17 15:40:15 +07:00
parent 87e18d0333
commit 2876976c63
18 changed files with 17 additions and 17 deletions

View File

@@ -0,0 +1,9 @@
import { useEffect } from 'react';
const useDocumentTitle = (title) => {
useEffect(() => {
document.title = title;
}, [title]);
};
export default useDocumentTitle;