mirror of
https://github.com/littensy/charm.git
synced 2026-10-22 12:41:37 +00:00
refactor: remove unnecessary features, update docs
This commit is contained in:
parent
7a88c784fa
commit
37f79ecc3f
20 changed files with 774 additions and 955 deletions
13
packages/vide-charm/src/index.d.ts
vendored
13
packages/vide-charm/src/index.d.ts
vendored
|
|
@ -1,8 +1,11 @@
|
|||
/**
|
||||
* Subscribes to the state of an atom or selector. Returns a source that
|
||||
* updates when the state changes.
|
||||
* Returns a reactive source that subscribes to the current value of the given
|
||||
* signal or getter function.
|
||||
*
|
||||
* @param callback The atom or selector to subscribe to.
|
||||
* @returns The reactive source.
|
||||
* @param getter The getter function to subscribe to.
|
||||
* @return The reactive source.
|
||||
*/
|
||||
export function useAtom<T>(callback: () => T, dependencies?: any[]): () => T;
|
||||
export function useSignalState<T>(getter: () => T, dependencies?: any[]): () => T;
|
||||
|
||||
// Aliases
|
||||
export { useSignalState as useAtom };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue