Skip to content

Client component not re-rendering after imported upper case function changes #82436

@tmota900

Description

@tmota900

Link to the code that reproduces this issue

https://github.com/tmota900/client-component-hmr-no-re-render

To Reproduce

  1. Run the dev server, open the app's main page
  2. Change the FunctionTest return value
  3. Validate that the server component re-rendered, the client one didn't.

Current vs. Expected behavior

Image

When I update the function return value, I was expecting it to re-render all the components using it. Atm, when saving, HMR kicks in but doesn't trigger the client component re-render, showing the outdated version of the return until the page is refreshed.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.6.0: Wed Jul 31 20:48:52 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_T6020
  Available memory (MB): 32768
  Available CPU cores: 12
Binaries:
  Node: 20.17.0
  npm: 10.8.2
  Yarn: N/A
  pnpm: 7.33.7
Relevant Packages:
  next: 15.4.2-canary.32 // Latest available version is detected (15.4.2-canary.32).
  eslint-config-next: N/A
  react: 19.1.1
  react-dom: 19.1.1
  typescript: 5.9.2
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Not sure

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

I tested this in the latest 3 major versions of next (15,14,13) and none seemed to re-render the client component. I went to do a sanity check on a react application and client components do re-render if a function being used by them changes.

EDIT:

The issue seems to only happen when the used function is defined in upper case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions