mirror of
https://github.com/littensy/charm.git
synced 2026-10-20 17:51:37 +00:00
8 lines
287 B
TypeScript
8 lines
287 B
TypeScript
/**
|
|
* Subscribes to the state of an atom or selector. Returns a source that
|
|
* updates when the state changes.
|
|
*
|
|
* @param callback The atom or selector to subscribe to.
|
|
* @returns The reactive source.
|
|
*/
|
|
export function useAtom<T>(callback: () => T, dependencies?: any[]): () => T;
|