From 969e30aa20196025b2ae9237a52a599a70e76071 Mon Sep 17 00:00:00 2001 From: asmyshlyaev177 Date: Wed, 13 Nov 2024 22:38:33 +0400 Subject: [PATCH] docs: comment about default values --- packages/example-nextjs14/src/app/components/CodeBlocksNext.tsx | 1 + packages/example-nextjs14/src/app/components/CodeBlocksRR.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/example-nextjs14/src/app/components/CodeBlocksNext.tsx b/packages/example-nextjs14/src/app/components/CodeBlocksNext.tsx index b305377..617f27e 100644 --- a/packages/example-nextjs14/src/app/components/CodeBlocksNext.tsx +++ b/packages/example-nextjs14/src/app/components/CodeBlocksNext.tsx @@ -51,6 +51,7 @@ import { form } from './form'; export const ComponentB = ({ searchParams }: { searchParams?: object }) => { const { urlState } = useUrlState(form, { searchParams });// [!code highlight:1] +// will be defaultValue from \`form\` if not in url, no need to check // [!code word:urlState] return
name: {urlState.name}
};`} diff --git a/packages/example-nextjs14/src/app/components/CodeBlocksRR.tsx b/packages/example-nextjs14/src/app/components/CodeBlocksRR.tsx index 2c2247d..a65d4d3 100644 --- a/packages/example-nextjs14/src/app/components/CodeBlocksRR.tsx +++ b/packages/example-nextjs14/src/app/components/CodeBlocksRR.tsx @@ -45,6 +45,7 @@ import { form } from './form'; export const ComponentB = () => { const { urlState } = useUrlState(form);// [!code highlight:1] +// will be defaultValue from \`form\` if not in url, no need to check // [!code word:urlState] return
name: {urlState.name}
};`}