-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
docs: jokes app tutorial in fetching jokes part #3547
Conversation
at point where reader is only done with building types for `Joke`, the example shows to import `type User` from `@prisma/client`
Hi @justinsalasdev, Welcome, and thank you for contributing to Remix! Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once. You may review the CLA and sign it by adding your name to contributors.yml. Once the CLA is signed, the If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at hello@remix.run. Thanks! - The Remix team |
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
use generated type in `type LoaderData`
pick from `type Joke` on projected query
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution @justinsalasdev !
Left you a couple of remarks to address.
* separated `json` import from `types` import * imported `Joke` type on `findMany` example - placed directly below `import type`'s for grouping (updated line highlight for new lines added) * removed `Pick` from projected example and replaced with `{ id:string, name:string }` - add line highlight so reader is aware that original `Joke` type needs to be edited
remove left-over market
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @justinsalasdev. Thanks for the PR.
As noted in the text right before your changes:
this is just an example. No need to copy/paste this 😄
It's only there to give you an idea of how things work as an example so you can finish the goal without looking at the finished version. We purposefully don't use Joke
there. I think using Joke would be more confusing because it would lead people to believe that they need to make those changes to their code which they do not.
I'd be more in favor of changing the example completely to be something like Sandwich
or something.
update example type from `Joke` to `Sandwich`
@kentcdodds, still can't believe I got an actual pr review from you ^__^ Overall, here are the changes I've done
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stellar. Thank you so much @justinsalasdev 👏
at point where reader is only done with building types for
Joke
, the example shows to importtype User
from@prisma/client
where it is not there yet.the succeeding code continuation also didn't use the built type from
@prisma/client