I've added a listener and this error is showing.
const [branchBanner, setBannerIsShowing] = useState(false);
useEffect(() => {
const initAndFetch = async () => {
const branch = (await import('branch-sdk')).default;
branch.closeJourney();
branch.init(key);
branch.track('pageview', { experiment: 'gen-banner' });
branch.setBranchViewData({
data: {
x: 'open',
y: id,
},
});
branch.addListener(JourneyEvent.didShowJourney, () => {
setBannerIsShowing(true);
});
};
if (isMobile) {
void initAndFetch();
}
}, [isMobile, id]);
Describe the bug
I've added a listener and this error is showing.
Steps to reproduce
This is my code:
Expected Behavior
There should be no error
Additional Information/Context
No response
SDK version used (
window.branch.sdk)2.58.2
Environment
chrome Version 110.0.5481.100