Frontend Blog

Frontend Blog

React hook - customHook - useDocumentTitle

Jul 23, 20211 min read 4 views

1. Chưa sử dụng customHook import {useState, useEffect} from 'react' export default function DocumentTitle() { const [count, setCount] = useState(0) useEffect(() => { document.title = `Count ${count}` }, [count]) return ( <button ...

React hook - customHook - useDocumentTitle
React hook - useRef - example timer
React hook - useRef - auto focus input
React hook - useReducer vs useState
React hook - useReducer - Fetching data
React hook - useReducer - complex State & Action