Preparing search index...

    Module useRandomTagSuggestions

    useRandomTagSuggestions - Cached random tag suggestions for add-mode routes.

    The three add-mode route wrappers (RecipeAddManual, RecipeAddOcr, RecipeAddScrape) each seed RecipeFormScreen with a small set of random tag names used as suggestion chips. Computing this list runs a DB read (useTags().searchRandomlyTags) on every route mount, which compounds on the common navigation path Add -> cancel -> Add again.

    This hook caches the resolved names in a module-scoped slot with a short TTL so re-entry within the window reuses the cached list and skips the DB read. The cache returns a stable array reference per fresh window which the caller can pass straight to props without identity churn between mounts.

    The TTL is exported so tests can drive the cache deterministically.

    RANDOM_TAG_SUGGESTIONS_TTL_MS
    useRandomTagSuggestions