diff --git a/.changeset/afraid-boxes-grab.md b/.changeset/afraid-boxes-grab.md new file mode 100644 index 0000000..818e3c2 --- /dev/null +++ b/.changeset/afraid-boxes-grab.md @@ -0,0 +1,7 @@ +--- +"@use-search-params-state/react": patch +"@use-search-params-state/eslint-config": patch +"@use-search-params-state/next": patch +--- + +Added array values feature diff --git a/apps/playground/src/app/array-values/page.tsx b/apps/playground/src/app/array-values/page.tsx new file mode 100644 index 0000000..4f7705e --- /dev/null +++ b/apps/playground/src/app/array-values/page.tsx @@ -0,0 +1,22 @@ +"use client"; + +import { SetKeyValueArrayInputs } from "@/components/set-key-value-inputs"; +import { Alert } from "@/components/ui/alert"; + +import { useSearchParamsState } from "@use-search-params-state/next"; + +export default function Page() { + const [state, setState] = useSearchParamsState(); + + return ( +
+ + {"This demonstration shows how to use the library with arrays."} + + + setState(k, v)} /> + +
{JSON.stringify(state, null, 2)}
+
+ ); +} diff --git a/apps/playground/src/app/sidebar.tsx b/apps/playground/src/app/sidebar.tsx index d998de1..e4da3ca 100644 --- a/apps/playground/src/app/sidebar.tsx +++ b/apps/playground/src/app/sidebar.tsx @@ -8,6 +8,7 @@ export const Sidebar = () => {