Skip to main content

🧭 React Native β€” Navigation

Typed navigation with the Destination factory from react-native-azeoo-lib.

import { Destination } from 'react-native-azeoo-lib';

await sdk.navigate(Destination.nutrition.plan('summer-plan-2025'));
await sdk.navigate(Destination.nutrition.recipe(42, 'Pasta'));
await sdk.navigate(Destination.nutrition.scanner('ai'));
await sdk.navigate(Destination.nutrition.search('lunch'));

await sdk.navigate(Destination.training.workouts());

Meal types: 'breakfast' | 'lunch' | 'dinner' | 'snack'.
Scanner kinds: 'barcode' | 'mobile' | 'ai'.


Stack API​

await sdk.navigate(Destination.nutrition.search());

await sdk.goBack();
await sdk.backToRoot();
const canPop = await sdk.canGoBack();

BackHandler listeners run before the native bridge handler.


Module containers​

When using a JS tab navigator for nutrition + training native views:

sdk.setModuleContainer((module) => {
setActiveTab(module === 'nutrition' ? 0 : 1);
return true; // handled
});
Return true when you switched tabs

Returning false tells the SDK your host did not handle the module change.


// initialize β€” see Configuration
await AzeooSDK.initialize({ apiKey, deepLinks: { scheme, host, pathPrefix } });

// incoming link
const handled = await sdk.handleDeepLink(url);
if (!handled) {
await sdk.navigate(Destination.nutrition.plan(parsedId));
}

Wire Linking.addEventListener('url', …) or React Navigation linking.


Embedded views​

<NutritionView style={{ flex: 1 }} />
<TrainingView style={{ flex: 1 }} />

Combine with navigate when a host screen button should open a specific SDK route.

See UI components.


See also​