Skip to content

[Compiler Bug]: #36579

@amitsingh881024-ctrl

Description

@amitsingh881024-ctrl

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-hooks (build issue installing or using the eslint plugin)
  • react-compiler-healthcheck (build issue installing or using the healthcheck script)

Link to repro

health

Repro steps

class HealthTracker:
def init(self):
self.water = 0
self.exercise = 0
self.sleep = 0

def add_water(self, glasses):
    self.water += glasses

def add_exercise(self, minutes):
    self.exercise += minutes

def add_sleep(self, hours):
    self.sleep += hours

def show_report(self):
    print("\n--- Health Report ---")
    print(f"Water Intake: {self.water} glasses")
    print(f"Exercise: {self.exercise} minutes")
    print(f"Sleep: {self.sleep} hours")

    if self.water >= 8:
        print("✓ Good hydration")
    if self.exercise >= 30:
        print("✓ Active lifestyle")
    if self.sleep >= 7:
        print("✓ Healthy sleep schedule")

tracker = HealthTracker()

tracker.add_water(8)
tracker.add_exercise(45)
tracker.add_sleep(8)

tracker.show_report()

How often does this bug happen?

Every time

What version of React are you using?

npm list react

What version of React Compiler are you using?

npm list babel-plugin-react-compiler

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: UnconfirmedA potential issue that we haven't yet confirmed as a bugType: Bug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions