-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use:enhance
shadows data
#9845
Comments
I suppose |
+1 on |
I had to do the same renaming in some other example app before. Which makes me wonder if this is just a good renaming opportunity or if it's a symptom of a bigger problem which is that we want to update |
@dummdidumm That one, I think you're referring to result.data, whereas Rich is talking about the FormData object that the SubmitFunction receives before the request is sent. Also, it seems the FormData is passed in again to the callback that runs after the submit, but it doesn't appear in the types. Should that be removed or renamed? kit/packages/kit/src/runtime/app/forms.js Line 113 in 6e2efcf
And if it is renamed, would it be a breaking change to only keep formData there since it wasn't documented before? |
Describe the problem
I want to access the
data
prop in myuse:enhance
callback, but I also want to reference theFormData
object that was passed in. Right now I have to do({ data: formData }) => {...}
or similar:Describe the proposed solution
It should probably just be
formData
in the first place. We can do this non-breakingly (but maybe deprecatedata
for removal in version 2?)Alternatives considered
formdata
?fd
?stuff
?Importance
nice to have
Additional Information
No response
The text was updated successfully, but these errors were encountered: