/** * Returns a stateful value synchronized with localStorage, and a function to update it. * * @param {string} key localStorage key * @param {*} initialState Initial state */ export default function useLocalStorage(key: string, initialState?: T | (() => T)): [T, (nextValueOrFunction: T | ((value: T) => T)) => void];