How to use the react-native-branch.subscribe function in react-native-branch

To help you get started, we’ve selected a few react-native-branch examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MetaMask / metamask-mobile / app / components / Views / BrowserTab / index.js View on Github external
Engine.context.PersonalMessageManager.hub.on('unapprovedMessage', messageParams => {
			if (!this.isTabActive()) return false;
			this.setState({ signMessage: true, signMessageParams: messageParams, signType: 'personal' });
		});
		Engine.context.TypedMessageManager.hub.on('unapprovedMessage', messageParams => {
			if (!this.isTabActive()) return false;
			this.setState({ signMessage: true, signMessageParams: messageParams, signType: 'typed' });
		});

		Engine.context.AssetsController.hub.on('pendingSuggestedAsset', suggestedAssetMeta => {
			if (!this.isTabActive()) return false;
			this.setState({ watchAsset: true, suggestedAssetMeta });
		});

		Branch.subscribe(this.handleDeeplinks);

		if (Platform.OS === 'ios') {
			this.state.scrollAnim.addListener(({ value }) => {
				const diff = value - this.scrollValue;
				this.scrollValue = value;
				this.clampedScrollValue = Math.min(Math.max(this.clampedScrollValue + diff, 0), BOTTOM_NAVBAR_HEIGHT);
			});

			this.state.offsetAnim.addListener(({ value }) => {
				this.offsetValue = value;
			});
		} else {
			this.keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', this.keyboardDidHide);
		}

		// Listen to network changes
github MetaMask / metamask-mobile / app / components / Views / Entry / index.js View on Github external
componentDidMount() {
		DeeplinkManager.init(this.props.navigation);
		this.unsubscribeFromBranch = Branch.subscribe(this.handleDeeplinks);

		setTimeout(async () => {
			const existingUser = await AsyncStorage.getItem('@MetaMask:existingUser');
			if (existingUser !== null) {
				await this.unlockKeychain();
			} else {
				this.animateAndGoTo('OnboardingRootNav');
			}
		}, 100);
	}
github sovrin-foundation / connector-app / app / deep-link / index.js View on Github external
componentDidMount() {
    branch.subscribe(this.onDeepLinkData)
  }

react-native-branch

Branch Metrics React Native SDK

MIT
Latest version published 2 months ago

Package Health Score

87 / 100
Full package analysis