You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, nice course, but there seems to be an issue with useRouter on pages/events/[...slug].js
Sometimes router.query.slug is an empty object and not only in pre-rendering phase. Especially wenn hitting enter instead of reloading the page.
To make sure not having any errors in my code I copied source code from your repo and changed the firebase url to my project.
I still get this error
I already did some research on this topic and tried to avoid this error by using 'router' Object in a useEffect without success. Using
useRouter().isReady as dependency did not work also. All in all quite unpredictable behaviour.
Also changed from "swr": "^2.2.1" to "swr": "^2.0.0" without success.
And also installed prj-05-data-fetching from this repository. Hitting enter a few times also leads to the described error.
The text was updated successfully, but these errors were encountered:
Hello, nice course, but there seems to be an issue with useRouter on pages/events/[...slug].js
Sometimes router.query.slug is an empty object and not only in pre-rendering phase. Especially wenn hitting enter instead of reloading the page.
To make sure not having any errors in my code I copied source code from your repo and changed the firebase url to my project.
I still get this error
I already did some research on this topic and tried to avoid this error by using 'router' Object in a useEffect without success. Using
useRouter().isReady as dependency did not work also. All in all quite unpredictable behaviour.
Also changed from "swr": "^2.2.1" to "swr": "^2.0.0" without success.
And also installed prj-05-data-fetching from this repository. Hitting enter a few times also leads to the described error.
The text was updated successfully, but these errors were encountered: