From 6d9c062f55dc5a08f2030d9113e083d7728fc1b5 Mon Sep 17 00:00:00 2001 From: Christopher Chang <51393127+chriscerie@users.noreply.github.com> Date: Wed, 20 Sep 2023 12:53:23 -0700 Subject: [PATCH] Update docs --- docs/src/lints/roblox_roact_non_exhaustive_deps.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/lints/roblox_roact_non_exhaustive_deps.md b/docs/src/lints/roblox_roact_non_exhaustive_deps.md index 568d6f1b..9c4c3ca8 100644 --- a/docs/src/lints/roblox_roact_non_exhaustive_deps.md +++ b/docs/src/lints/roblox_roact_non_exhaustive_deps.md @@ -55,6 +55,7 @@ end 4. This lint does not take effect if nothing is passed to the second argument of the hook. 5. This lint is only active if you are using the Roblox standard library. 6. This lint warns against complex dependency expressions like function calls and dynamic indexing. This currently false negatives with function calls without any indexing, such as `{ a() }`. +7. This lint will ignore upvalues that are not reactive. Some examples of this are variables defined outside the component and variables that are known to be stable such as setter functions to `useState`. ## Deviations from [eslint-plugin-react-hooks/exhaustive-deps](https://www.npmjs.com/package/eslint-plugin-react-hooks) 1. ESLint requires passing in `a` for `a.b()` since js can implicitly pass `a` as `this` to `a.b`. Lua doesn't do this, so we allow `a.b` as dependencies.