Skip to content

[Compiler]: Using for loop for array of strings #30627

Closed
@saul-atomrigs

Description

@saul-atomrigs

What kind of issue is this?

  • React Compiler core (the JS output is incorrect, or your app works incorrectly after optimization)
  • babel-plugin-react-compiler (build issue installing or using the Babel plugin)
  • eslint-plugin-react-compiler (build issue installing or using the eslint plugin)
  • react-compiler-healthcheck (build issue installing or using the healthcheck script)

Link to repro

Repro steps

Hello @gsathya ,

I was wondering if the for ... in was intended instead of for ... of.

I think for ... of is more recommended for array of strings (Array<string>) like in this case.

Thanks!

How often does this bug happen?

Every time

What version of React are you using?

18.3.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions