Aman Desai
Aman Desai
NNuxt
Created by ivancic_josip on 9/17/2024 in #❓・help
Redirecting from a route on server side
await navigateTo
3 replies
NNuxt
Created by ivancic_josip on 9/17/2024 in #❓・help
Redirecting from a route on server side
you have to await it
3 replies
NNuxt
Created by Domme on 9/18/2024 in #❓・help
Request env variables on application startup from backend
then read from that state everywhere
19 replies
NNuxt
Created by Domme on 9/18/2024 in #❓・help
Request env variables on application startup from backend
this happens in my case as well
19 replies
NNuxt
Created by Domme on 9/18/2024 in #❓・help
Request env variables on application startup from backend
then modify the state
19 replies
NNuxt
Created by Domme on 9/18/2024 in #❓・help
Request env variables on application startup from backend
do one thing, inside the plugin, read from runtime config, and set to state
19 replies
NNuxt
Created by Domme on 9/18/2024 in #❓・help
Request env variables on application startup from backend
never do that, it will lead to weird states
19 replies
NNuxt
Created by Domme on 9/18/2024 in #❓・help
Request env variables on application startup from backend
in that case, it is best to use my approach
19 replies
NNuxt
Created by Domme on 9/18/2024 in #❓・help
Request env variables on application startup from backend
19 replies
NNuxt
Created by Domme on 9/18/2024 in #❓・help
Request env variables on application startup from backend
19 replies
NNuxt
Created by Domme on 9/18/2024 in #❓・help
Request env variables on application startup from backend
Yes ofcource, when you can't do that
19 replies
NNuxt
Created by Domme on 9/18/2024 in #❓・help
Request env variables on application startup from backend
so you can get consistent state
19 replies
NNuxt
Created by Domme on 9/18/2024 in #❓・help
Request env variables on application startup from backend
since plugins run before any of the UI logic runs
19 replies
NNuxt
Created by Domme on 9/18/2024 in #❓・help
Request env variables on application startup from backend
but setting in plugin is the recommended way
19 replies
NNuxt
Created by Domme on 9/18/2024 in #❓・help
Request env variables on application startup from backend
In Vidur, I wrote a plugin to fetch env from API call and setup as state to be accessible throughout the application. https://github.com/profilecity/vidur/blob/main/app/plugins/setup-state.ts
19 replies