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

Rename CacheNode.data → .lazyData #59473

Merged
merged 1 commit into from
Dec 11, 2023

Commits on Dec 11, 2023

  1. Rename CacheNode.data -> .lazyData

    `CacheNode.data` is used to lazily kick off a request during render, and
    represents the result of the entire Flight response. It doesn't
    correspond directly to the RSC data of the cache node itself — that's
    `subTreeData`. To complicate things further, I'm about to add another
    field to CacheNode that represents prefetched RSC data.
    
    To make it a little less confusing, I've renamed the `data` field to
    `lazyData`. Still not perfectly clear on first glance, but it's at least
    more specific. With PPR, the goal is to remove the lazy data fetching
    mechanism in favor of initiating the request immediately upon
    navigation. So this field will eventually go away.
    
    In the next PR, I will rename `subTreeData`, too. Perhaps something with
    "rsc" in the name so it's less generic than "data".
    acdlite committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    2048564 View commit details
    Browse the repository at this point in the history