react icon indicating copy to clipboard operation
react copied to clipboard

[React 19] Compiler: support computed properties using object dot/bracket notation

Open gkiely opened this issue 1 month ago • 0 comments

Summary

Using obj.value or obj['value'] in a computed property causes the compiler to not memoize the component.

Example: https://playground.react.dev/#N4Igzg9grgTgxgUxALhAHQHYDMobgFwEsIMACAYQgFsAHEhDfACgEpThNTS4Sx9SIAIwBWpALztOXUgDcAhgBtkpAOQBrBAE8VAGikBfANxSeGPrMVQE4yWWkBtIcIB08hQF1l+GFb139UjAI+LBkADwAfGEA9BGYRpgg+kA

I see there is a todo prefix in the compiler error. Feel free to close if this is a known issue.

gkiely avatar May 16 '24 02:05 gkiely