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
_How to run "useLazyAsyncData" on client-side only?_
Use the "clientSide" option. For example:
Nuxt.useLazyAsyncData(objects, { clientSide: true });
#27278
A user needs to log in with a token stored in local storage before accessing certain data, but when using the useLazyAsyncData function, it results in an unauthorized error on the server-side. The user is willing to help implement this feature and suggests it could be implemented as a module. Prior to implementation, the user has reviewed the contribution guide and checked existing discussions and issues.
Describe the feature
There are some data need user login with the token I store in localstorage. But if I run useLazyAsyncData it will get unauthoried error on server side.
So current I create component use useLazyAsyncData in it and put it in <client-only></client-only>
Additional information
Would you be willing to help implement this feature?
nuxtbot
changed the title
How to run useLazyAsyncData on client-side only.
_How to run "useLazyAsyncData" on client-side only?_
Use the "clientSide" option. For example:
Nuxt.useLazyAsyncData(objects, { clientSide: true });
May 20, 2024
Summary (generated):
A user needs to log in with a token stored in local storage before accessing certain data, but when using the
useLazyAsyncData
function, it results in an unauthorized error on the server-side. The user is willing to help implement this feature and suggests it could be implemented as a module. Prior to implementation, the user has reviewed the contribution guide and checked existing discussions and issues.Describe the feature
There are some data need user login with the token I store in localstorage. But if I run
useLazyAsyncData
it will get unauthoried error on server side.So current I create component use
useLazyAsyncData
in it and put it in<client-only></client-only>
Additional information
Final checks
The text was updated successfully, but these errors were encountered: