Skip to content

Commit

Permalink
♻️ shorter, simpler function name
Browse files Browse the repository at this point in the history
  • Loading branch information
astoilkov committed Jun 12, 2024
1 parent 8bbd749 commit 2687a9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/useLocalStorageState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default function useLocalStorageState<T = undefined>(
): LocalStorageState<T | undefined> {
const serializer = options?.serializer
const [defaultValue] = useState(options?.defaultValue)
return useBrowserLocalStorageState(
return useLocalStorage(
key,
defaultValue,
options?.storageSync,
Expand All @@ -51,7 +51,7 @@ export default function useLocalStorageState<T = undefined>(
)
}

function useBrowserLocalStorageState<T>(
function useLocalStorage<T>(
key: string,
defaultValue: T | undefined,
storageSync: boolean = true,
Expand Down

0 comments on commit 2687a9a

Please sign in to comment.