Unverified Commit e43f134c authored by Hank Lin's avatar Hank Lin Committed by GitHub

docs: fix the url of router event (#51339)



Refer to [here](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/toString#examples)

The `searchParams.toString()` doesn't include the question mark.
Co-authored-by: 's avatarBalázs Orbán <18369201+balazsorban44@users.noreply.github.com>
parent 831f58a7
...@@ -80,7 +80,7 @@ export function NavigationEvents() { ...@@ -80,7 +80,7 @@ export function NavigationEvents() {
const searchParams = useSearchParams() const searchParams = useSearchParams()
useEffect(() => { useEffect(() => {
const url = pathname + searchParams.toString() const url = `${pathname}?${searchParams}`
console.log(url) console.log(url)
// You can now use the current URL // You can now use the current URL
// ... // ...
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment