Skip to content

Commit

Permalink
docs: comment about default values
Browse files Browse the repository at this point in the history
  • Loading branch information
asmyshlyaev177 committed Nov 13, 2024
1 parent ee5f33b commit 969e30a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 <div>name: {urlState.name}</div>
};`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <div>name: {urlState.name}</div>
};`}
Expand Down

0 comments on commit 969e30a

Please sign in to comment.