-
Notifications
You must be signed in to change notification settings - Fork 71
have to refresh routes on both home and status routes #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm also having this issue. After login the first time, the main content area is blank until I refresh. Then when clicking on a tweet, the tweet id is undefined so I see a 500 error from prisma. The main content is blank and then when I refresh, it shows the tweet. If I go back home and click on another tweet, the first tweet shows because it's cached I guess. And even though the id in the url has changed, it still shows undefined if I console.log(route.params.id)
Same issue if creating a tweet from the home page. When it redirects to status/id the id is undefined until page refresh. I am using nuxt RC 13 so I've been waiting to run into problems eventually, being 10 releases ahead of what is used in the course. |
here's the repo i created @isimmons that fixed the issue: https://github.com/edwardz8/nuxt3-prisma i don't remember the exact file(s) that i had to update that fixed the issue as it's been a minute since i've looked at this, but the hydration issue no longer throws the error. good luck :) |
Here was my solution const route = useRouter().currentRoute.value const id = route.params.id "useRoute().params.id" is cached for some reason |
that's quite helpful |
Well I tried but it didn't work as expected still thanks for your reply and
suggestions.
…On Sat, Nov 18, 2023 at 1:11 PM whyAlwaysMe ***@***.***> wrote:
Here was my solution
const route = useRouter().currentRoute.value
const id = route.params.id
"useRoute().params.id" is cached for some reason
that's quite helpful
—
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHE5LVH2PQO3MPOFGXRS37DYFBRCBAVCNFSM57EDI7G2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBRG42DENRWGEYQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
for any data to appear you have to refresh routes on both home and status routes. hydration error.
Hydration completed but contains mismatches.
The text was updated successfully, but these errors were encountered: