Provides reactive ingredient data and all ingredient operations.
The ingredients array is updated atomically by useSyncExternalStore
whenever the database notifies the ingredients slice. Note that
editIngredient and deleteIngredient also invalidate the recipes slice
(handled internally by RecipeDatabase) so recipe consumers re-render too.
Provides reactive ingredient data and all ingredient operations.
The
ingredientsarray is updated atomically byuseSyncExternalStorewhenever the database notifies theingredientsslice. Note thateditIngredientanddeleteIngredientalso invalidate therecipesslice (handled internally by RecipeDatabase) so recipe consumers re-render too.