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