How to use the react-native-branch.createBranchUniversalObject 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 letsdoitworld / World-Cleanup-Day / mobile-app / src / screens / TrashPoint / TrashPointMenu / TrashPointMenu.js View on Github external
pressShare = async () => {
    const { trashPoint, photo } = this.props;

    const description = trashPoint.composition[0];
    const branchUniversalObject = await branch
      .createBranchUniversalObject(trashPoint.id, {
        locallyIndex: true,
        title: trashPoint.name,
        contentDescription: description,
        contentImageUrl: photo,
        contentMetadata: {
          ratingAverage: 4.2,
          customMetadata: {
            type: 'trashpoint',
            name: trashPoint.name,
            address: trashPoint.address,
            amount: trashPoint.amount,
            areas: trashPoint.areas.join(),
            composition: trashPoint.composition.join(),
            counter: trashPoint.counter.toString(),
            createdAt: trashPoint.createdAt,
github letsdoitworld / World-Cleanup-Day / mobile-app / src / screens / EventDetails / EventsMenu / EventMenu.js View on Github external
pressShare = async () => {
    const { event, photo } = this.props;
    const branchUniversalObject = await branch.createBranchUniversalObject(event.id, {
      locallyIndex: true,
      title: event.name,
      contentDescription: event.description,
      contentImageUrl: photo,
    });
    const linkProperties = {
      feature: 'share',
      channel: 'RNApp',
    };

    const controlParams = {
      $desktop_url: 'https://www.worldcleanupday.org/map-it/',
      $uri_redirect_mode: 2,
      type: 'event',
    };

react-native-branch

Branch Metrics React Native SDK

MIT
Latest version published 2 months ago

Package Health Score

87 / 100
Full package analysis