diff --git a/examples/05_query_params/src/App.tsx b/examples/05_query_params/src/App.tsx
index 98ad75f..bc7db29 100644
--- a/examples/05_query_params/src/App.tsx
+++ b/examples/05_query_params/src/App.tsx
@@ -5,10 +5,10 @@ import React from 'react';
const pageAtom = atomWithQueryParams('page', 1);
const Page = () => {
- const [Page, setPage] = useAtom(pageAtom);
+ const [page, setPage] = useAtom(pageAtom);
return (
-
Page {Page}
+
Page {page}
diff --git a/src/atomWithQueryParams.ts b/src/atomWithQueryParams.ts
index 32b3b38..5a95861 100644
--- a/src/atomWithQueryParams.ts
+++ b/src/atomWithQueryParams.ts
@@ -62,7 +62,7 @@ export const atomWithQueryParams =
(
const resolvedDefault = resolveDefaultValue(currentValue);
nextValue = String(
- (value as (prev: T | undefined) => T)(resolvedDefault),
+ (value as (curr: T | undefined) => T)(resolvedDefault),
);
} else {
// Otherwise, use the provided value directly.