From c5d4ef470b6684b666757756e3b2f49d390eb9f9 Mon Sep 17 00:00:00 2001 From: Richard Date: Sun, 9 Jun 2024 20:19:06 -0700 Subject: [PATCH] docs: remove conditional deps warnings --- README.md | 4 ---- src/effect.luau | 3 --- src/index.d.ts | 3 --- 3 files changed, 10 deletions(-) diff --git a/README.md b/README.md index 2f6c1ac..80bf5e6 100644 --- a/README.md +++ b/README.md @@ -144,10 +144,6 @@ effect(() => { `effect` returns a cleanup function. -#### Caveats - -- Dependencies are captured when the effect is created, but not when it re-runs. This means that atoms referenced conditionally might be "skipped" in the dependency list. - --- ### `computed(molecule, options?)` diff --git a/src/effect.luau b/src/effect.luau index 8f5450e..7da63af 100644 --- a/src/effect.luau +++ b/src/effect.luau @@ -6,9 +6,6 @@ type Cleanup = () -> () Runs the given callback immediately and whenever any atom it depends on changes. Returns a cleanup function that unsubscribes the callback. - Note that dependencies are only evaluated once when the effect is created, - and conditional dependencies may not work as expected. - @param callback The function to run. @return A function that unsubscribes the callback. ]=] diff --git a/src/index.d.ts b/src/index.d.ts index 8c4f0e2..6df73b0 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -82,9 +82,6 @@ declare namespace Charm { * Runs the given callback immediately and whenever any atom it depends on * changes. Returns a cleanup function that unsubscribes the callback. * - * Note that dependencies are only evaluated once when the effect is created, - * so conditional dependencies may not work as expected. - * * @param callback The function to run. * @returns A function that unsubscribes the callback. */