-
-
Notifications
You must be signed in to change notification settings - Fork 629
Replace Next.js data fetching patterns with React on Rails async props in RSC docs #2791
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
50f6512
Replace Next.js data fetching patterns with React on Rails async prop…
justin808 8902722
Fix review issues: export default, thread safety, misleading label, S…
justin808 9408846
Fix misleading sequential comment and add CSRF token ERB example
justin808 803dae5
Address review feedback: Product.all warning, emit thread safety, res…
justin808 65d03e9
Fix prop name mismatch: CommentForm uses snake_case to match ERB
justin808 856df87
Address review feedback: Product.all warning, async props wording, CS…
justin808 12ff992
Add staleTime to React Query initialData example and broaden migratio…
justin808 1c0cfda
Merge unique content from PR 2790: initialDataUpdatedAt and form_with…
justin808 1456bdf
Merge remaining PR 2790 content: Ruby waterfalls, use() examples, res…
justin808 790486a
Fix fetch error handling and clarify initialDataUpdatedAt comment
justin808 d157b42
Address PR review feedback: prop naming, test fix, safety improvements
justin808 9279c97
Fix undefined user_id and incorrect comment in troubleshooting examples
justin808 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
productprops exampleThe new ERB snippet now passes
@product.as_json, but theProductPageexample immediately readsproduct.specsandproduct.reviewsbelow. ActiveRecord's defaultas_jsononly serializes the model's own attributes, so readers who copy this replacement will lose those nested collections and likely breakProductSpecs/ReviewList. Please either include the associations inas_jsonor pass them as separate props.Useful? React with 👍 / 👎.