
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-native-like-button
Advanced tools
Provides an animated like/unlike button for reusability.
Just run the below command in your project folder
Note:- This runs only in React Native CLI project. For Expo projects, use this package.
To install,
npm install --save react-native-like-button
Below shown is the usage of the component as an uncontrolled component.
import LikeButton from 'react-native-like-button';
...
// basic Usage
<LikeButton />
For controlled component, you can use it as shown.
import LikeButton from "react-native-like-button";
const [Liked, SetLiked] = useState(true);
const onLikePress = async () => {
// Do something for Like operation
SetLiked(true);
};
const onUnLikePress = async () => {
// Do something for Like operation
SetLiked(true);
};
// basic Usage
<LikeButton liked={Liked} onPress={Liked ? onUnLikePress : onLikePress} />;
| Parameter | Default | Description |
|---|---|---|
| liked | undefined | Color of the timestamp which shows total time that has been elapsed since the video started playing |
| onPress | undefined | Color of the timestamp which shows total duration of the clip |
| iconSize | undefined | Color of the timestamp which shows total duration of the clip |
| Parameter | Default | Description |
|---|---|---|
| likedColor | red | Color of the liked icon |
| likedIconName | "heart-outline" | name of the icon when liked is true (Derived from MaterialCommunityIcons family) |
| customLikedComponent | null | custom component to show in place of liked icon |
| Parameter | Default | Description |
|---|---|---|
| unlikedColor | black | Color of the unliked icon |
| unlikedIconName | "heart" | name of the icon when liked is false (Derived from MaterialCommunityIcons family) |
| customUnlikedComponent | null | custom component to show in place of unliked icon |
FAQs
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.