-
-
Notifications
You must be signed in to change notification settings - Fork 638
Get rid of renderRequestId and use local trackers instead of global tracking
#1745
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
Judahmeek
merged 14 commits into
master
from
abanoubghadban/pro538/fix-problem-of-not-caching-components-while-rsc-is-on
Jul 14, 2025
Merged
Changes from 2 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
99d9f13
get rid of renderRequestId and use local trackers instead of global t…
AbanoubGhadban 95ecbf1
fix some minor issues
AbanoubGhadban 0734cc5
linting
AbanoubGhadban abdc351
Refactor RSC tests to use local request trackers and update context h…
AbanoubGhadban 19fc4a2
Increase timeout duration in AsyncContent test to improve reliability
AbanoubGhadban 521c5b3
Enhance error handling and validation in RSC-related modules
AbanoubGhadban 745753d
Refactor RSC component handling to improve payload key generation
AbanoubGhadban e8ebbc2
Remove unused export from utils.ts to clean up codebase
AbanoubGhadban 9a27142
Enhance error handling in RSC modules by introducing `extractErrorMes…
AbanoubGhadban a7deca6
Update parameter documentation in getReactServerComponent.client.ts
AbanoubGhadban 6547616
Renamed `createRSCPayloadKey` to `createServerComponentCacheKey`
AbanoubGhadban 1179f40
Revert " Renamed `createRSCPayloadKey` to `createServerComponentCache…
AbanoubGhadban 9bebfc4
Refactor RSC payload key generation to include `domNodeId`
AbanoubGhadban 92aa907
generate rsc payload key only if needed
AbanoubGhadban 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| type PostSSRHook = () => void; | ||
|
|
||
| /** | ||
| * Post-SSR Hook Tracker - manages post-SSR hooks for a single request. | ||
| * | ||
| * This class provides a local alternative to the global hook management, | ||
| * allowing each request to have its own isolated hook tracker without sharing state. | ||
| */ | ||
| class PostSSRHookTracker { | ||
| private hooks: PostSSRHook[] = []; | ||
|
|
||
| /** | ||
| * Adds a hook to be executed when SSR ends for this request. | ||
| * | ||
| * @param hook - Function to call when SSR ends | ||
| */ | ||
| addPostSSRHook(hook: PostSSRHook): void { | ||
| this.hooks.push(hook); | ||
| } | ||
|
|
||
| /** | ||
| * Notifies all registered hooks that SSR has ended and clears the hook list. | ||
| * This should be called when server-side rendering is complete. | ||
| */ | ||
| notifySSREnd(): void { | ||
| this.hooks.forEach((hook) => hook()); | ||
| this.hooks = []; | ||
| } | ||
|
|
||
| /** | ||
| * Clears all hooks without executing them. | ||
| * Should be called if the request is aborted or cleanup is needed. | ||
| */ | ||
| clear(): void { | ||
| this.hooks = []; | ||
| } | ||
| } | ||
|
|
||
| export default PostSSRHookTracker; | ||
This file was deleted.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.