GithubHelp home page GithubHelp logo

Comments (5)

manniL avatar manniL commented on August 26, 2024

You lose reactivity when using humanReadableError(error.value)

from nuxt.js.

MikeBellika avatar MikeBellika commented on August 26, 2024

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 avatar manniL commented on August 26, 2024

@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.

MikeBellika avatar MikeBellika commented on August 26, 2024

@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.

I see. So the right thing to do is to wrap it in computed?

from nuxt.js.

manniL avatar manniL commented on August 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.