docs: remove conditional deps warnings

This commit is contained in:
Richard 2024-06-09 20:19:06 -07:00
parent aa52c98cd9
commit c5d4ef470b
3 changed files with 0 additions and 10 deletions

View file

@ -144,10 +144,6 @@ effect(() => {
`effect` returns a cleanup function. `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?)` ### `computed(molecule, options?)`

View file

@ -6,9 +6,6 @@ type Cleanup = () -> ()
Runs the given callback immediately and whenever any atom it depends on Runs the given callback immediately and whenever any atom it depends on
changes. Returns a cleanup function that unsubscribes the callback. 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. @param callback The function to run.
@return A function that unsubscribes the callback. @return A function that unsubscribes the callback.
]=] ]=]

3
src/index.d.ts vendored
View file

@ -82,9 +82,6 @@ declare namespace Charm {
* Runs the given callback immediately and whenever any atom it depends on * Runs the given callback immediately and whenever any atom it depends on
* changes. Returns a cleanup function that unsubscribes the callback. * 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. * @param callback The function to run.
* @returns A function that unsubscribes the callback. * @returns A function that unsubscribes the callback.
*/ */