[Compiler Bug]: 'Unused 'use no memo' directive'
lint warning even though the directive is used
#31407
Open
1 of 4 tasks
Labels
Component: Optimizing Compiler
Status: Unconfirmed
A potential issue that we haven't yet confirmed as a bug
Type: Bug
What kind of issue is this?
Link to repro
https://playground.react.dev/#N4Igzg9grgTgxgUxALhAegFQYDoDsAEG+AKgBYCWY+l+Y5AtuQDYCGM+ALhPlGAgMocWHBABp8AIygdqMlkyYQA7lQDmCDh3K5VnUgnysRYGSeEGEANwS48hSQgBmEGAY77aQkflIsqEhBseAAcAE3NQyQBPfFcWOA4AOjsMNDwEAA9glxlHKFwE8ggCXgEogsFzAAptci15AEp8YDt8AHJS-FxuegR6CDbWuGKTfABtcT4OADV5KAQAXXwAXh4+SpEa3DryRoBuIZGZV0cVtYQAJSctnf3W1w5YAjHW-HwqpuWAPlinRLhYK5cBxRK93pY5ghPj8WgQ3vDyKcqid-oCbDIAITLVYQpjzJqw+FE36OVEwIEyHGQg5w4m0DSzPEIKq4-E0ukAXzBHNBcIWNK5tlwmBwBCIAEEfBAIABrTjcGWBYKcGDxOUQU7uCyhOosCRMAxmbwavQGbTBaTJMX4AByEG87mE+CUBlwgUiXB8LFwoQN+BY+GGUGCfpNCFC6kDfgQYGQKXwAEZEoGIPRGDJ6CwYgEowpw9QCFraCxer8fQh2IoIMq-CFwiIAKI6maQ+MAJmTwfrCCbdUZ83wmezBjg8gNkRYjhE7GGabq1Coo7zoXjZBjBjYBlCA89Rcc8RkjpkNqg9ACMAAkrgLTJpMxyAAvGOyKjKAhGhAAWgk0ZX1tZBhduYVDepEs7pgW+AuKEFbyvgwQVs4MD0Cm5IIAk+BIZmmjaKoVqEGkbpZDkmH5IUxTnL2Qj6syhJQbgADCvg6GIrTFAAQniMC8m8cShAA8rgTAxKs+5MHwPH4ABknFEx3rqFeN79qxcKyd6iBMJJMH7lATAcFRuFnGJEl4ByBKtB0fBdD0fQDIcuCjGM6gtky7EILhVHhpMDKQm5HnNuGSyrKU-DlHAGzMmC2ksLp+nNoZAD8zRSZC+AcvgyBdLpmmtA0NL2aM4HzqsHwrDCYLDA5MgAX5OieZEqzOcptWqPVHzsgiSI1e5dUBZEWKrLg2X4AAZCNKWuT1rV9YkAH4ANE34s0YJvLJzHqAliQsr5U31bNkJ5dyYJTM1u19VUQ0KIdtL0ZxsCbe1rQcvlcKVYV6kIEwZyld8y03SdO3+XU4YXdl11Emt8kIIp0jKQ9AHg-CakFJ9D2I6tuB3TAaMdc9eAFTI6IVlREXfdCf1Eoi7wYnxgnCeZN1vADk1AyIoRVMAi0GGZHVvIKfMvW8b23mE5hUcp31ukoynk3RGNySxMMufMD1SzLvMplVXMtfVZxNYDvXA+z6PUF1BvTUbo3jd1rPhvtTLzdiXQINLB0U8SzPzDr52cwBmVq6lPPcvgn1WXL8JoGgJAUFQNCOOQrgTlOsFFSCtDcPOYCkNATCRKo3AmKq5CqKQh7cJDLErfgkf4AA6huYBgKebi+DI85KMwX1utY7A5vHicOEhFjAsTzYReI2cuj3+HEhXG1bQHTIm-zaWC5row24bbN6z5LNbyDiMPE87tvH72tnZbSWbxbbP2wOmXSWClAGToD-m7rC2XV9Y3zbTQlRJJIWqZ0yAKjCjHKN0iYwBJl4FSRIgKNmbMpSSgpBQgA5EAA
Repro steps
useSyncState
anduseEditable
break when the React Compiler runs on it. So I added'use no memo'
to the top ofuseSyncState
anduseEditable
. In both these places,eslint-plugin-react-compiler
reports that the'use no memo'
directive is unused. Even though this directive is the only difference between a passing E2E test and a failing one!'use no memo'
directive becomes unnecessary.How often does this bug happen?
Every time
What version of React are you using?
18.3.1
What version of React Compiler are you using?
19.0.0-beta-6fc168f-20241025
The text was updated successfully, but these errors were encountered: