react icon indicating copy to clipboard operation
react copied to clipboard

[Compiler Bug]: don't uses dependecies of useMemo

Open Altro31 opened this issue 1 month ago • 0 comments

What kind of issue is this?

  • [X] 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

https://playground.react.dev/#N4Igzg9grgTgxgUxALhASwLYAcIwC4AEwUYCAsghhAL4EBmMEGBA5DAgIZx4sA6AdgIQAPHPnpR+3NBH4EyATwCCWLAApgBdvwAmCGAWoBKIgIEECcWWEL8OGBGAIBeAiXKUIatSecA+AgADJQAbPEYCABJgMg48AAsAOhgOXSYfakCAGgBtbT0YAF0jMzktBDxYOQAeAGEmLCUCOwcwZ2AWx2oAej8BalKhUVxCOklpWQJ67CUNZvsEQxNgUosrfhsJEJDOlyDoztoAJQgdGABbgHMoBAAvQNXyypganTQANz8ACQRtiAIAOq4EI6IhjbaHardN6fADc-RA1CAA

Repro steps

  1. Look at useMemo.
  2. Dependecies are not used in compilation

How often does this bug happen?

Every time

What version of React are you using?

playground

Altro31 avatar May 19 '24 15:05 Altro31