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

Move ref type check to receiver #28464

Merged
merged 2 commits into from
Mar 1, 2024
Merged

Commits on Feb 29, 2024

  1. Move ref type check to receiver

    The runtime contains a type check to determine if a user-provided ref
    is a valid type — a function or object (or a string, when
    `disableStringRefs` is off). This currently happens during child
    reconciliation. This changes it to happen only when the ref is passed
    to the component that the ref is being attached to.
    
    This is a continuation of the "ref as prop" change — until you actually
    pass a ref to a HostComponent, class, etc, ref is a normal prop that has
    no special behavior.
    acdlite committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    fb87afe View commit details
    Browse the repository at this point in the history
  2. Remove "string" from invalid ref error message

    String is no longer a valid accepted type. (Except when
    `disableStringRefs` is off, in the Meta build, but even in that case
    they are deprecated so we shouldn't list it as a valid type.)
    acdlite committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    ea0180b View commit details
    Browse the repository at this point in the history