-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix caching of null result of buildComponentRenderResult (#6352)
**Problem:** When a component returns null, it is rerendered all the time. **Root cause:** The problem is in the caching of the result of `buildComponentRenderResult`. The cache is initialized with a `null` value, so when the value is `null` we rerun `buildComponentRenderResult` However, the value can be null just because the component renders nothing. **Commit Details:** - Created a new type for the `buildResult` type which includes an external value for the non-initialized state. **Manual Tests:** I hereby swear that: - [x] I opened a hydrogen project and it loaded - [x] I could navigate to various routes in Preview mode
- Loading branch information
Showing
1 changed file
with
34 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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