Preparing search index...

    Function useShoppingCategories

    • Returns all ingredient categories sorted by their translated display name.

      The sort is locale-sensitive and re-runs whenever the active language changes, so the list is always correctly ordered for the current locale without manual invalidation.

      Returns TIngredientCategories[]

      Array of every TIngredientCategories value in ascending translated order for the current locale.

      function ShoppingCategoryPicker() {
      const categories = useShoppingCategories();
      return categories.map(cat => <Text key={cat}>{t(cat)}</Text>);
      }