Skip to content

Find References doesn't find lazy loaded React components #50957

@buondevid

Description

@buondevid

Does this issue occur when all extensions are disabled?: Yes
Does this issue occur in the Insiders build?: Yes
VS Code Version: 1.71.2
OS Version: MacOS 12.5.1 (MacBook Pro 2019)

The problem is that Find References doesn't find React components that are lazy loaded.

Steps to Reproduce:

  1. Export a React component.
    Screenshot 2022-09-23 at 09 51 58

  2. Lazy load it somewhere.
    Screenshot 2022-09-23 at 09 52 06

  3. Check that VS Code doesn't find any reference for the component.

Not sure if it's a bug or intended behavior (probably intended), but nonetheless it would be nice that finding references would also find lazy-loaded ones. This forces me to always use standard search (with all the downsides of it) to see if I've used the Component somewhere that references can't find.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions