Coder Social home page Coder Social logo

Comments (7)

nartc avatar nartc commented on May 18, 2024 1

@AlemTuzlak I'll try putting together something over the weekend, if not earlier next week

from remix-hook-form.

jdpearce avatar jdpearce commented on May 18, 2024 1

@AlemTuzlak Quick and dirty repro here -> https://github.com/jdpearce/rhf-action-error-repro

from remix-hook-form.

AlemTuzlak avatar AlemTuzlak commented on May 18, 2024

How the hook works under the hood it takes the returned action data from your useActionData hook and it checks if there is an errors field in the response, if there isn't it takes the whole action object and tries to match the structure of the returned data object, does this function response return an object that matches the original error object?

from remix-hook-form.

nartc avatar nartc commented on May 18, 2024

@AlemTuzlak I'm @jdpearce coworker and the shape of the response is export type doThingResponse = { result: 'success', someValue: string } | { result: 'error', error: string };. The data object that we're sending is { name: 'some name', id: 'some id' } if this is what you meant by the "original error object"

from remix-hook-form.

AlemTuzlak avatar AlemTuzlak commented on May 18, 2024

Interesting, mind providing a minimum repro so I can test it out and see what's going on?

from remix-hook-form.

AlemTuzlak avatar AlemTuzlak commented on May 18, 2024

@jdpearce I looked at the repro, I know what the issue is. You're right this is an issue. Will fix it as soon as I can!

from remix-hook-form.

AlemTuzlak avatar AlemTuzlak commented on May 18, 2024

@jdpearce @nartc please try it now with 1.2 release, I tested it on your repro and fixed it

from remix-hook-form.

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.