Skip to content

Commit

Permalink
Merge pull request #66 from swasan/feature/W-14511993
Browse files Browse the repository at this point in the history
@W-14511993 Implement removeTag in example App
  • Loading branch information
prakashini-sf authored and GitHub Enterprise committed Nov 20, 2023
2 parents 4d2bb49 + e31d2f5 commit c439ac7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions example/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ const Tags = () => {
});
};

const removeTag = async () => {
MCReactModule.removeTag(inputText);
setInputText('');
updateTags('Tag removed');
};

const handleTags = async () => {
MCReactModule.addTag(inputText);
setInputText('');
Expand Down Expand Up @@ -157,6 +163,11 @@ const Tags = () => {
onPress={() => updateTags('Tags updated')}>
<Text style={styles.buttonText}>Get Tags</Text>
</TouchableOpacity>

<TouchableOpacity style={styles.button} onPress={removeTag}>
<Text style={styles.buttonText}>Remove Tag</Text>
</TouchableOpacity>

</View>
);
};
Expand Down

0 comments on commit c439ac7

Please sign in to comment.