Likonima
Likonima
NNuxt
Created by abd on 5/23/2024 in #❓・help
Noob question about hydration in SSR
useAsyncData is used if you need the data on server side without re-fetching the data on client side and offers more fine grained control. Reading up on it it seems not relevant which one to chose though for your case. in nuxt 2 async data was a method to handle any logic server side, and I kept the concept like this in my head. It's definitely handy when you have built your own ofetch base and use that to make api calls. that can then be used in the useAsyncData. or NuxtContent can be fetched in there. https://www.youtube.com/watch?v=njsGVmcWviY https://nuxt.com/docs/getting-started/data-fetching https://www.youtube.com/watch?v=0X-aOpSGabA
5 replies
NNuxt
Created by hz2222 on 5/23/2024 in #❓・help
what do you guys recommend for google login with nuxt frontend and laravel backend?
2 replies
NNuxt
Created by Jan382 on 5/23/2024 in #❓・help
How to connect Carousel, Swiper correctly?
That's a low effort question. Can you provide more info on what you have tried and what doesn't work
6 replies
NNuxt
Created by Nik ⚡ on 5/23/2024 in #❓・help
Middleware doesn't work (well) when using async/await?!
just to clarify middleware has nothing to do with component lifecycle hooks. Instead they are guards called before opening a page. async operations can be done
12 replies
NNuxt
Created by serafina on 5/23/2024 in #❓・help
useAsyncData + pinia store field
might help to share the full code properly formatted
2 replies
NNuxt
Created by abd on 5/23/2024 in #❓・help
Noob question about hydration in SSR
and to be conform with standards I'd recommend a lowercase file name
5 replies
NNuxt
Created by abd on 5/23/2024 in #❓・help
Noob question about hydration in SSR
because you're not awaiting the function call. Another thing is that you should not use useFetch inside a function and another thing is that you should probably use useAsyncData for that one
5 replies
NNuxt
Created by Nik ⚡ on 5/23/2024 in #❓・help
Getting access to cookies in middleware
it surely does not
39 replies
NNuxt
Created by Nik ⚡ on 5/23/2024 in #❓・help
Getting access to cookies in middleware
I have no clue but I've had several issues when trying to use nuxt as a backend and just don't use it.
39 replies
NNuxt
Created by Nik ⚡ on 5/23/2024 in #❓・help
Getting access to cookies in middleware
that needs some debugging. maybe some other condition messing with this logic. without seeing the project I can't tell from here
39 replies
NNuxt
Created by Nik ⚡ on 5/23/2024 in #❓・help
Getting access to cookies in middleware
looks good to me. must be sth else
39 replies
NNuxt
Created by Nik ⚡ on 5/23/2024 in #❓・help
Getting access to cookies in middleware
well again .value missing but it should redirect in this case since the variable is a ref containing either value of string, null or undefined
39 replies
NNuxt
Created by Nik ⚡ on 5/23/2024 in #❓・help
Getting access to cookies in middleware
can you copy paste the modified code?
39 replies
NNuxt
Created by Nik ⚡ on 5/23/2024 in #❓・help
Getting access to cookies in middleware
unpleasant
39 replies
NNuxt
Created by Nik ⚡ on 5/23/2024 in #❓・help
Getting access to cookies in middleware
but it's right to use that. any errors?
39 replies
NNuxt
Created by Nik ⚡ on 5/23/2024 in #❓・help
Getting access to cookies in middleware
yeah that seems to be it and will likely fix your issue
39 replies
NNuxt
Created by Nik ⚡ on 5/23/2024 in #❓・help
Getting access to cookies in middleware
not sure with the theme but did you do compare = null (which would assign a value) instead of === null ? regardless of that the code improvement should be done using logical not !
39 replies
NNuxt
Created by Nik ⚡ on 5/23/2024 in #❓・help
Getting access to cookies in middleware
sounds weird. at least for the code that can be improved by using if(!session), if(!payload) and then the optional chaining for session?.value could be omitted
39 replies
NNuxt
Created by Nik ⚡ on 5/23/2024 in #❓・help
Getting access to cookies in middleware
it's a ref. needs .value
39 replies
NNuxt
Created by Nik ⚡ on 5/23/2024 in #❓・help
Getting access to cookies in middleware
you asked for reading
39 replies