Comments (7)
@AlemTuzlak I'll try putting together something over the weekend, if not earlier next week
from remix-hook-form.
@AlemTuzlak Quick and dirty repro here -> https://github.com/jdpearce/rhf-action-error-repro
from remix-hook-form.
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.
@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.
Interesting, mind providing a minimum repro so I can test it out and see what's going on?
from remix-hook-form.
@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.
@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)
- Number validation fails HOT 3
- submitData string issue HOT 5
- [suggestion] Implicit Inference of Form Schema in `getValidatedFormData` and `validateFormData` HOT 7
- `formState.isSubmitting` is `true` when the loaders are refetching HOT 8
- Property 'root' does not exist on type HOT 7
- Form State isDirty not resetting after submit HOT 1
- Could not parse content as FormData HOT 1
- Remix Hook Form File Upload HOT 1
- 'mode' does not exist in type 'UseRemixFormOptions' HOT 3
- getValidatedFormData auto parse JSON cause error if value is JSON string HOT 3
- reset method does not accept options
- TypeScript: Return type of useRemixForm hook is incorrect. HOT 6
- Have to set stringifyAllValues: false else all strings are double quoted HOT 2
- (bug): Remix hook form is not behaving as expected or documented HOT 5
- Form Reset On Success HOT 1
- File Upload With Other Form Data - Question HOT 16
- remix-hook-form not compatible with 7.51.0 of react-hook-form
- When using Link to navigate to other pages, isSubmitting is also true, which is not as expected.
- Allow `encType: "application/json"` from `submitConfig`
- Multiple forms on a single page 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 remix-hook-form.