Comments (5)
You lose reactivity when using humanReadableError(error.value)
from nuxt.js.
You lose reactivity when using
humanReadableError(error.value)
@manniL Thank you for the quick reply and great video!
Are you sure that it's the loss of reactivity that causes this issue? I don't need error to be reactive.
Also is it expected that this behaves differently on server and client side?
from nuxt.js.
@manniL Thank you for the quick reply and great video!
Glad you liked it ππ»
Are you sure that it's the loss of reactivity that causes this issue? I don't need error to be reactive. Also is it expected that this behaves differently on server and client side?
Yes, it should be. Because the request is executed on the client when server: false
, the data and error values are null
first and will be populated when the request was processed.
from nuxt.js.
@manniL Thank you for the quick reply and great video!
Glad you liked it ππ»
Are you sure that it's the loss of reactivity that causes this issue? I don't need error to be reactive. Also is it expected that this behaves differently on server and client side?
Yes, it should be. Because the request is executed on the client when
server: false
, the data and error values arenull
first and will be populated when the request was processed.
I see. So the right thing to do is to wrap it in computed
?
from nuxt.js.
Exactly ππ» (then your function can work with the "value only" and the computed can return the human readable error
from nuxt.js.
Related Issues (20)
- Server page is nested in an extra div compared to client page
- How to solve the issue where data fetched using useFetch isn't requested again after refreshing the page, you can achieve this by using React Query or by using useLayoutEffect in combination with useState and useEffect.
- in Nuxt3.11.2,How to solve the issue where data fetched using useFetch isnβt requested again after refreshing the page?
- WARN [nuxt] Expected @nuxt/schema to be at least 3.12.2 but got 3.11.2 HOT 7
- How to solve the issue where data fetched using useFetch isn't requested again after refreshing the page? The solution lies in configuring the cache of the useFetch Hook.
- "How do you solve the problem where data fetched by useFetch is not re-requested again after refreshing the page in Nuxt 3.11.2?" HOT 1
- in Nuxt3.11.2,How to solve the issue where data fetched using useFetch isnβt requested again after refreshing the page? HOT 3
- useRoute() inside $fetch interseptors HOT 1
- Nuxt 3 Webpack Invalid Token In Dev Mode HOT 1
- ERROR invalid options argument after upgrading 2.17.4 -> 2.18.0 HOT 2
- Server Components `useRoute` not updating HOT 2
- 404 error when using navigateTo in a middleware HOT 4
- Enabling compatibilityVersion: 4 not working as expected when using layers HOT 2
- What is the best practice for useId and getting rid of these hydration errors.
- Development server keeps trying to reach localhost:24678 which doesn't exist HOT 17
- useCookie navigateTo new page hydration HOT 6
- SSR Context Lost HOT 5
- [nuxt] `useId` might not work correctly with components that have `inheritAttrs: false`. HOT 3
- When running npm run generate, the script path is incorrect. HOT 2
- Server component cannot be used with kebab-case HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuxt.js.