Docs

Deep Linking

Handle incoming deep links in your React Native app with the Grovs SDK

Use the onDeeplinkReceived event to handle incoming deep links:

import Grovs from 'react-native-grovs-wrapper';
 
const listener = Grovs.onDeeplinkReceived((data) => {
    console.log('Link:', data.link);
    console.log('Payload:', data.payload);
    console.log('Tracking:', data.tracking);
 
    // Route the user based on payload
    if (data.payload?.screen === 'product') {
        navigation.navigate('Product', { id: data.payload.productId });
    }
});
 
// When you no longer need the listener
listener.remove();