You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wouldn’t really consider this an issue. You’re referencing the state variable indeed, and how you end up using it is indeed tricky to understand for the analyzer, since any change in the destructured fields would cause it to break.
In this case, I think your code would be better served by moving the destructuring out of the memo callback and just specifying deep as the dependency. It would probably have slightly better runtime performance too.
Environment information
Rule name
useExhaustiveDependencies
Playground link
https://biomejs.dev/playground/?code=aQBtAHAAbwByAHQAIAB7ACAAdQBzAGUAUwB0AGEAdABlACwAIAB1AHMAZQBNAGUAbQBvACAAfQAgAGYAcgBvAG0AIAAiAHIAZQBhAGMAdAAiADsACgAKAGUAeABwAG8AcgB0ACAAZgB1AG4AYwB0AGkAbwBuACAAVABlAHMAdABDAG8AbQBwAG8AbgBlAG4AdAAoACkAIAB7AAoAIAAgAGMAbwBuAHMAdAAgAFsAcwB0AGEAdABlAF0AIAA9ACAAdQBzAGUAUwB0AGEAdABlACgAewAgAHMAbwBtAGUAOgAgAHsAIABkAGUAZQBwADoAIAAiAG8AYgBqAGUAYwB0ACIAIAB9ACAAfQApADsACgAKACAAIAAvAC8AIABkAG8AZQBzAG4AJwB0ACAAdwBvAHIAawAsACAAcgBlAHEAdQBpAHIAZQBzACAAYABzAHQAYQB0AGUAYAAgAGEAcwAgAGEAIABkAGUAcABlAG4AZABlAG4AYwB5AAoAIAAgAGMAbwBuAHMAdAAgAGwAZQBuAGcAdABoACAAPQAgAHUAcwBlAE0AZQBtAG8AKAAoACkAIAA9AD4AIAB7AAoAIAAgACAAIABjAG8AbgBzAHQAIAB7ACAAcwBvAG0AZQA6ACAAewAgAGQAZQBlAHAAIAB9ACAAfQAgAD0AIABzAHQAYQB0AGUAOwAKAAoAIAAgACAAIAByAGUAdAB1AHIAbgAgAGQAZQBlAHAALgBsAGUAbgBnAHQAaAA7AAoAIAAgAH0ALAAgAFsAcwB0AGEAdABlAC4AcwBvAG0AZQAuAGQAZQBlAHAAXQApADsACgAKACAAIAAvAC8AIAB3AG8AcgBrAHMACgAgACAAYwBvAG4AcwB0ACAAbABlAG4AZwB0AGgAMgAgAD0AIAB1AHMAZQBNAGUAbQBvACgAKAApACAAPQA%2BACAAewAKACAAIAAgACAAYwBvAG4AcwB0ACAAZABlAGUAcAAgAD0AIABzAHQAYQB0AGUALgBzAG8AbQBlAC4AZABlAGUAcAA7AAoACgAgACAAIAAgAHIAZQB0AHUAcgBuACAAZABlAGUAcAAuAGwAZQBuAGcAdABoADsACgAgACAAfQAsACAAWwBzAHQAYQB0AGUALgBzAG8AbQBlAC4AZABlAGUAcABdACkAOwAKAAoAIAAgAHIAZQB0AHUAcgBuACAAbgB1AGwAbAA7AAoAfQA%3D
Expected result
Biome allows specifying paths for destructured properties as the dependencies (
state.some.deep
in the example) rather than the entire objectCode of Conduct
The text was updated successfully, but these errors were encountered: