Nutrition module (React Native)
The nutrition experience (diary, plans, recipes, scanner, cart, search, etc.) ships inside react-native-azeoo-lib. There is no separate AzeooUI.instance.nutrition object: use getAzeooSDK() or useAzeoo().sdk after initialize and connect.
Ways to open the nutrition UIβ
1. Embedded viewβ
Render NutritionView under AzeooProvider once the user is connected. See UI Components.
2. Full-screen or modal from the host appβ
On the shared SDK instance:
showNutrition(bottomSafeArea)/hideNutrition()β present the nutrition module as the SDK does for full-screen flows.displayNutritionModal(bottomSafeArea)/dismissNutritionModal()β present it in a modal sheet.
bottomSafeArea is a boolean (often true; use false if your app already handles bottom inset).
3. Navigate to a specific screen inside the moduleβ
Call navigateTo('nutrition', screen), where screen is the segment after /nutrition in the in-app path (no leading slash). The handler switches to the nutrition tab, then pushes /nutrition/<screen> (if screen is empty, that becomes /nutrition/; for the diary root, prefer showNutrition below).
Path reference (second argument to navigateTo, or use showNutrition for tab root):
| Goal | Call |
|---|---|
| Diary / nutrition tab root | showNutrition(bottomSafeArea) (or displayNutritionModal) β switches to the nutrition tab on the diary home |
| Nutrition plans list | navigateTo('nutrition', 'plans') |
| Single plan by id | navigateTo('nutrition', 'plans/plan-123') |
| Recipes | navigateTo('nutrition', 'recipes') |
| Recipe filters | navigateTo('nutrition', 'recipes/filters') |
| Recipe detail | navigateTo('nutrition', 'recipes/12345') |
| Barcode scanner | navigateTo('nutrition', 'scanner/barcode') |
| Mobile scanner | navigateTo('nutrition', 'scanner/mobile') |
| Cart | navigateTo('nutrition', 'cart') |
| Search | navigateTo('nutrition', 'search') |
| Shopping list | navigateTo('nutrition', 'shopping-list') |
| Add flow entry | navigateTo('nutrition', 'add') |
| Permission test (dev / QA) | navigateTo('nutrition', 'permission-test') |
| Nutrition settings | navigateTo('nutrition', 'settings') |
Other nested paths follow the same pattern (e.g. food detail foods/<id>, meal detail meals/<id>, add-food steps under foods/add/..., add-meal under meals/add/...).
Query parameters (e.g. diary date, recipe name) are supported on the native navigation API with a params map; the current React Native surface exposes navigateTo(module, screen) only. For URLs with query strings, handleDeepLink(uri) is usually the right tool once your deep-link base URL is configured.
Native Flutter parity for granular screens (e.g. showRecipe with recipeName) lives in the Pigeon nutrition API; if you need that from JS beyond path + deep link, see product roadmap or extend the RN bridge.
Go back in the Flutter stack: goBack() on the same SDK instance.
Code sketchβ
import { getAzeooSDK } from 'react-native-azeoo-lib';
const sdk = getAzeooSDK();
// After initialize + connect:
await sdk.showNutrition(true);
// or
await sdk.navigateTo('nutrition', 'scanner/barcode');
await sdk.goBack();
Same calls are available as const { sdk } = useAzeoo() when you are under AzeooProvider.
Deep linksβ
URLs handled by the SDK (scheme/host from your init config) can open nutrition routes; use handleDeepLink(uri) if you receive links in React Native. See Configuration and the Flutter route list under nutrition in the main SDK router for path shapes.
Next Stepsβ
- Configuration - Customize the UI
- Client API - Low-level API reference