diff --git a/docs/basic/useful-hooks.md b/docs/basic/useful-hooks.md index dea956a0..8821ffc3 100644 --- a/docs/basic/useful-hooks.md +++ b/docs/basic/useful-hooks.md @@ -37,7 +37,7 @@ function App() { } // Hook -function useLocalStorage(key: string, initialValue: T) { +function useLocalStorage(key: string, initialValue: T) : [T, (value: T | ((val: T) => T)) => void] { // State to store our value // Pass initial state function to useState so logic is only executed once const [storedValue, setStoredValue] = useState(() => {