Skip to content

Commit

Permalink
9% smaller bundle size
Browse files Browse the repository at this point in the history
  • Loading branch information
astoilkov committed Mar 18, 2024
1 parent 6553b87 commit 366bb10
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/useLocalStorageState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,6 @@ export default function useLocalStorageState<T = undefined>(
key: string,
options?: LocalStorageOptions<T | undefined>,
): LocalStorageState<T | undefined> {
// istanbul ignore next
if (useSyncExternalStore === undefined) {
throw new TypeError(
`You are using React 17 or below. Install with "npm install use-local-storage-state@17".`,
)
}

const [defaultValue] = useState(options?.defaultValue)

// SSR support
Expand Down

0 comments on commit 366bb10

Please sign in to comment.