Skip to content

clicked not working in FollowButton  #158

@ZaikinaEvgeniya-2

Description

@ZaikinaEvgeniya-2

Environment
"react-native": "0.61.5",
"react-native-activity-feed": "^0.9.1",

Function clicked not working,
I think problem in react-native-activity-feed-core/lib/components/FollowButton.js
if change onClick to onPress everything work

My patch

diff --git a/node_modules/react-native-activity-feed-core/lib/components/FollowButton.js b/node_modules/react-native-activity-feed-core/lib/components/FollowButton.js
index 064ee57..612966d 100644
--- a/node_modules/react-native-activity-feed-core/lib/components/FollowButton.js
+++ b/node_modules/react-native-activity-feed-core/lib/components/FollowButton.js
@@ -59,7 +59,7 @@ var FollowButton = /*#__PURE__*/function (_React$Component) {
           t = _this$props.t;
       var styles = (0, _styles.buildStylesheet)('followButton', this.props.styles);
       return /*#__PURE__*/_react["default"].createElement(_reactNative.TouchableOpacity, {
-        onClick: clicked
+        onPress: clicked
       }, /*#__PURE__*/_react["default"].createElement(_reactNative.View, {
         colors: this.state.followed ? ['#ccc', '#ccc'] : ['#008DFF', '#0079FF'],
         style: styles.button

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions