@dub/react-native
v0.0.1
Published
Handle deep links and track conversions from your React Native app.
Readme
Dub is the modern link attribution platform for short links, conversion tracking, and affiliate programs.
The Dub React Native SDK is a client side library built in Typescript for React Native.
It enables open tracking for regular/deferred deep links as well as tracking lead and sale conversion events.
Learn more about the Dub React Native SDK in the official documentation.
Dub is the modern link attribution platform for short links, conversion tracking, and affiliate programs. The Dub React Native SDK is a client side library built in React Native using Typescript. It enables open tracking for deep links and deferred deep links as well as conversion tracking for sale and lead events. Learn more about the Dub React Native SDK in the official documentation.
Handle deep links and track conversions from your React Native app.
Installation
npm install @dub/react-nativeUsage
Initialize the Dub SDK
Option 1: Use the DubProvider to wrap your app
import { DubProvider } from '@dub/react-native';
export default function App() {
return (
<DubProvider publishableKey="<DUB_PUBLISHABLE_KEY>" dubDomain="<DUB_DOMAIN>">
// Your app content...
</DubProvider>
)
}Option 2: Manually initialize the Dub SDK
import dub from '@dub/react-native';
export default function App() {
useEffect(() => {
dub.init({
publishableKey: '<DUB_PUBLISHABLE_KEY>',
domain: '<DUB_DOMAIN>',
});
}, []);
// Return your app...
}Development
Run pnpm install from the project root to install package dependencies. Then, start the dev server by running pnpm dev from the project root. The React Native dev server allows for hot reload.
Contributing
License
MIT
