Skip to content

Commit

Permalink
docs: Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
asmyshlyaev177 authored Nov 21, 2024
1 parent cce2bef commit d3a34af
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,14 @@ const userState = {
};

export const useUserState = () => {
const { urlState, setUrl } = useUrlState(userState);
const { urlState, setUrl, reset } = useUrlState(userState);

// other logic

// reset query params when navigating to other page
React.useEffect(() => {
return reset
}, [])

return { userState: urlState, setUserState: setUrl };;
}
Expand Down

0 comments on commit d3a34af

Please sign in to comment.