feat: created `useTitle` hook

pull/82/head
Samuel Rowe 3 years ago
parent 376dae3edb
commit a8607588a1

@ -0,0 +1 @@
export * from "./useTitle";

@ -0,0 +1,7 @@
import { useEffect } from "react";
export const useTitle = (title: string) => {
useEffect(() => {
document.title = title;
}, [title]);
};
Loading…
Cancel
Save