UNPKG

fluidstate

Version:

Library for fine-grained reactivity state management

16 lines (15 loc) 624 B
/** * Recursively traverses a (potentially reactive) data structure and "observes" * all its properties and elements. * * This function is typically used to ensure that all parts of a reactive * object, array, Set, or Map are actively tracked by the reactive system. * Accessing each part within this function effectively registers them as * dependencies if called within a reactive context (like a reaction or * computed atom). * * It handles cycles by keeping track of visited objects. * * @param something The data structure to deeply observe. */ export declare const deepObserve: <T>(something: T) => void;