Skip to content

Commit 4723230

Browse files
committed
feat: add hello method to ReactIterableAPI and integrate with Objective-C bridge; log API call in IterableAppProvider
1 parent ac7ccf4 commit 4723230

6 files changed

Lines changed: 10499 additions & 7 deletions

File tree

example/src/hooks/useIterableApp.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
useCallback,
66
useContext,
77
useState,
8+
useEffect,
89
} from 'react';
910
import { Alert } from 'react-native';
1011

@@ -14,6 +15,7 @@ import {
1415
IterableConfig,
1516
IterableInAppShowResponse,
1617
IterableLogLevel,
18+
api
1719
} from '@iterable/react-native-sdk';
1820

1921
import { Route } from '../constants/routes';
@@ -87,6 +89,11 @@ const EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
8789
export const IterableAppProvider: FunctionComponent<
8890
React.PropsWithChildren<unknown>
8991
> = ({ children }) => {
92+
useEffect(() => {
93+
console.log('api', api);
94+
api.hello();
95+
}, []);
96+
9097
const [returnToInboxTrigger, setReturnToInboxTrigger] =
9198
useState<boolean>(false);
9299
const [isInboxTab, setIsInboxTab] = useState<boolean>(false);

0 commit comments

Comments
 (0)