💅 useExhaustiveDependencies complains about not including React component in dependency array #3212
Closed
1 task done
Labels
A-Linter
Area: linter
L-JavaScript
Language: JavaScript and super languages
S-Bug-confirmed
Status: report has been confirmed as a valid bug
Environment information
Rule name
lint/correctness/useExhaustiveDependencies
Playground link
https://biomejs.dev/playground/?code=aQBtAHAAbwByAHQAIAB7ACAAdQBzAGUATQBlAG0AbwAgAH0AIABmAHIAbwBtACAAIgByAGUAYQBjAHQAIgA7AAoACgB0AHkAcABlACAATgBvAGQAZQAgAD0AIAB7AAoACQBpAGQAOgAgAG4AdQBtAGIAZQByADsACgAJAG4AbwBkAGUAcwA%2FADoAIABOAG8AZABlAFsAXQA7AAoAfQA7AAoACgBlAHgAcABvAHIAdAAgAGQAZQBmAGEAdQBsAHQAIABmAHUAbgBjAHQAaQBvAG4AIABNAHkAUgBlAGMAdQByAHMAaQB2AGUATABpAHMAdAAoAHsAIABuAG8AZABlACAAfQA6ACAAewAgAG4AbwBkAGUAOgAgAE4AbwBkAGUAIAB9ACkAIAB7AAoACQBjAG8AbgBzAHQAIABjAGgAaQBsAGQAcgBlAG4AIAA9ACAAdQBzAGUATQBlAG0AbwAoAAoACQAJACgAKQAgAD0APgAKAAkACQAJAG4AbwBkAGUALgBuAG8AZABlAHMAPwAuAG0AYQBwACgAKABjAGgAaQBsAGQAKQAgAD0APgAgACgACgAJAAkACQAJADwATQB5AFIAZQBjAHUAcgBzAGkAdgBlAEwAaQBzAHQAIABrAGUAeQA9AHsAYwBoAGkAbABkAC4AaQBkAH0AIABuAG8AZABlAD0AewBjAGgAaQBsAGQAfQAgAC8APgAKAAkACQAJACkAKQAsAAoACQAJAFsAbgBvAGQAZQBdACwACgAJACkAOwAKAAoACQByAGUAdAB1AHIAbgAgADwAZABpAHYAPgB7AGMAaABpAGwAZAByAGUAbgB9ADwALwBkAGkAdgA%2BADsACgB9AAoA
Expected result
MyRecursiveList
should not be required to be placed inside dependency array, because it's not something that can dynamically change between renders, similarly to when we use another component: https://biomejs.dev/playground/?code=aQBtAHAAbwByAHQAIAB7ACAAdQBzAGUATQBlAG0AbwAgAH0AIABmAHIAbwBtACAAIgByAGUAYQBjAHQAIgA7AAoACgB0AHkAcABlACAATgBvAGQAZQAgAD0AIAB7AAoACQBpAGQAOgAgAG4AdQBtAGIAZQByADsACgAJAG4AbwBkAGUAcwA%2FADoAIABOAG8AZABlAFsAXQA7AAoAfQA7AAoACgBmAHUAbgBjAHQAaQBvAG4AIABNAHkAQQBuAG8AdABoAGUAcgBDAG8AbQBwAG8AbgBlAG4AdAAoACkAIAB7AH0ACgAKAGUAeABwAG8AcgB0ACAAZABlAGYAYQB1AGwAdAAgAGYAdQBuAGMAdABpAG8AbgAgAE0AeQBSAGUAYwB1AHIAcwBpAHYAZQBMAGkAcwB0ACgAewAgAG4AbwBkAGUAIAB9ADoAIAB7ACAAbgBvAGQAZQA6ACAATgBvAGQAZQAgAH0AKQAgAHsACgAJAGMAbwBuAHMAdAAgAGMAaABpAGwAZAByAGUAbgAgAD0AIAB1AHMAZQBNAGUAbQBvACgACgAJAAkAKAApACAAPQA%2BAAoACQAJAAkAbgBvAGQAZQAuAG4AbwBkAGUAcwA%2FAC4AbQBhAHAAKAAoAGMAaABpAGwAZAApACAAPQA%2BACAAKAAKAAkACQAJAAkAPABNAHkAQQBuAG8AdABoAGUAcgBDAG8AbQBwAG8AbgBlAG4AdAAgAGsAZQB5AD0AewBjAGgAaQBsAGQALgBpAGQAfQAgAG4AbwBkAGUAPQB7AGMAaABpAGwAZAB9ACAALwA%2BAAoACQAJAAkAKQApACwACgAJAAkAWwBuAG8AZABlAF0ALAAKAAkAKQA7AAoACgAJAHIAZQB0AHUAcgBuACAAPABkAGkAdgA%2BAHsAYwBoAGkAbABkAHIAZQBuAH0APAAvAGQAaQB2AD4AOwAKAH0ACgA%3DCode of Conduct
The text was updated successfully, but these errors were encountered: