Skip to content
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

Discrepancy in "Mutations" section within App Tutorial #4974

Closed
larister opened this issue Dec 29, 2022 · 1 comment · Fixed by #5292
Closed

Discrepancy in "Mutations" section within App Tutorial #4974

larister opened this issue Dec 29, 2022 · 1 comment · Fixed by #5292
Labels

Comments

@larister
Copy link
Contributor

What version of Remix are you using?

N/A

Steps to Reproduce

Hey folks,

I'm going through your stellar App Tutorial and loving it. However, I spotted what appears to be a small discrepancy.

Once validation has been added in, the second paragraph after the screenshot says: "First I want you to notice that I've added an ActionData type so we could get some type safety". However, there is no ActionData type in the code example, only an actionData value.

Furthermore, the fourth paragraph states: "The badRequest helper function is important because it gives us typechecking that ensures our return value is of type ActionData, while still returning the accurate HTTP status, 400 Bad Request, to the client. If we just return the ActionData value, that would result in a 200 OK response, which isn't suitable since the form submission had errors."

However, the code example for the badRequest helper uses a generic type T, not the elusive ActionData type.

A small thing, but I had to double check a couple of times to make sure I hadn't missed anything (I sure hope I haven't actually missed anything).

Anyways loving Remix so far, keep up the great work!

Expected Behavior

I expected to see the ActionData type in the code examples

Actual Behavior

I didn't see the ActionData type in the code examples

@machour
Copy link
Collaborator

machour commented Jan 28, 2023

Thank you for filling this issue @larister 🙏🏼

You were totally right, we forgot to remove references to ActionData when we leveraged type inference introduced in 1.6.5.
See the release notes here: https://github.com/remix-run/remix/releases/tag/remix%401.6.5 to learn more about this.

Should be fixed by #5292, if you want to give it a look.

machour added a commit to machour/remix that referenced this issue Jan 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants