How to use the @rematch/core.dispatch.relationships function in @rematch/core

To help you get started, we’ve selected a few @rematch/core 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 EvanBacon / pro-chat / client / src / screens / HomeScreen.js View on Github external
onDislike={(uid) => {
            if (!firstDislike) {
              dispatch.onBoarding.update({ firstDislike: Date.now() });
              this.alert(
                Meta.meta_info_dislike_title,
                Meta.meta_info_dislike_subtitle,
                Meta.meta_info_dislike_action,
              );
              // if (firebase.analytics) { firebase.analytics().logEvent('first_dislike', { uid }); }
            }
            dispatch.relationships.updateAsync({
              uid,
              type: Relationship.dislike,
            });
          }}
          onIndexChange={(uid) => {
github EvanBacon / pro-chat / client / src / screens / HomeScreen.js View on Github external
onLike={(uid) => {
            if (!firstLike) {
              dispatch.onBoarding.update({ firstLike: Date.now() });
              this.alert(
                Meta.meta_info_like_title,
                Meta.meta_info_like_subtitle,
                Meta.meta_info_like_action,
              );
              // if (firebase.analytics) { firebase.analytics().logEvent('first_like', { uid }); }
            }
            dispatch.relationships.updateAsync({
              uid,
              type: Relationship.like,
            });
          }}
          onDislike={(uid) => {
github EvanBacon / pro-chat / client / src / screens / ProfileScreen.js View on Github external
dispatch.users.getProfileImage({ uid });
    }
    if (!name || update) {
      dispatch.users.getPropertyForUser({ uid, property: 'first_name' });
    }
    if (!about || update) {
      dispatch.users.getPropertyForUser({ uid, property: 'about' });
    }
    if (!likes || update) {
      dispatch.users.getPropertyForUser({ uid, property: 'likes' });
    }
    if (!rating || update) {
      dispatch.users.getPropertyForUser({ uid, property: 'rating' });
    }
    if (!relationship || update) {
      dispatch.relationships.getAsync({ uid });
    }

    const isMatched = await new Promise(res =>
      dispatch.relationships.isMatched({ uid, callback: res }));

    // this.props.navigation.setParams({ isMatched, name, uid });
    LayoutAnimation.easeInEaseOut();

    this.setState({ isMatched });
  };
github EvanBacon / pro-chat / client / src / screens / DevTeamScreen.js View on Github external
onDislike={uid =>
            dispatch.relationships.updateAsync({
              uid,
              type: Relationship.dislike,
            })
          }
github EvanBacon / pro-chat / client / src / components / RateSection.js View on Github external
onDislike={() =>
            dispatch.relationships.updateAsync({
              uid,
              type: Relationship.dislike,
            })
          }
github EvanBacon / pro-chat / client / src / components / RateSection.js View on Github external
onLike={() =>
            dispatch.relationships.updateAsync({
              uid,
              type: Relationship.like,
            })
          }
github EvanBacon / pro-chat / client / src / screens / DevTeamScreen.js View on Github external
onLike={uid =>
            dispatch.relationships.updateAsync({ uid, type: Relationship.like })
          }
github EvanBacon / pro-chat / client / src / components / Footer.js View on Github external
updateRelationship = async (uid) => {
    if (uid && typeof uid === 'string') {
      dispatch.relationships.getAsync({ uid });
    }
  };