refactor: remove unnecessary features, update docs

This commit is contained in:
littensy 2025-11-02 18:55:41 -08:00
parent 7a88c784fa
commit 37f79ecc3f
20 changed files with 774 additions and 955 deletions

View file

@ -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 };