nandi95
nandi95
NNuxt
Created by nandi95 on 4/19/2024 in #❓・help
hydration mismatch
I load the user in a global middleware if they are logged in:
export default defineNuxtRouteMiddleware(async () => {
const auth = useAuthStore();

if (auth.loggedIn && !auth.userLoaded) {
await auth.fetchUser();
}
});
export default defineNuxtRouteMiddleware(async () => {
const auth = useAuthStore();

if (auth.loggedIn && !auth.userLoaded) {
await auth.fetchUser();
}
});
user is logged in In server The user isn't loaded so it loads it, then user is there during hyrdration and on client side (from the payload) for some reason when the component is created it doesn't have this data (user id) available as seen on the video if I log the user data in the setup (created lifecycle hook) the user data isn't there what am I missing?
1 replies
NNuxt
Created by nandi95 on 1/14/2024 in #❓・help
Maintenance mode
Is there an existing (maintained) solution?
2 replies
NNuxt
Created by nandi95 on 7/29/2023 in #❓・help
routing shows raw file
I can navigate /app from within the app which will give me the file rendered from /pages/app/index.vue BUT if I load load the page first time (/app) it gives me the the raw file content of the app.vue I can also navigate to pages/app/index.vue or utils/index which would behave the same. what am I doing wrong?
15 replies
NNuxt
Created by nandi95 on 7/28/2023 in #❓・help
is there a way to customise the fallback of the suspense?
2 replies
NNuxt
Created by nandi95 on 3/30/2023 in #❓・help
data fetching prefixed with localhost
why all my data fetching calls prefixed with localhost? https://stackblitz.com/edit/nuxt-starter-ec7q6b?file=app.vue
6 replies
NNuxt
Created by nandi95 on 3/29/2023 in #❓・help
I get the error JSON.parse: unexpected character at line 1 column 1 of the JSON data
I get this error when I try to fetch data in before route enter and it's an initial navigation why?
3 replies
NNuxt
Created by nandi95 on 3/4/2023 in #❓・help
How can I use a layout for the error page?
Is that possible?
9 replies