ajenkins / ajenkins/react-native-dynamic-deck-swiper
Create useCard custom hook
Ouverte
enhancement
- Langage dominant
- JavaScript
- Étoiles
- 14
- Forks
- 3
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Rather than using the `getNextCardData` prop, you could instead use a custom hook, maybe called `useCard` that returns similar information about the card. This is how I imagine it being used:
```js
function MySwiper() {
const { swipeDirection } = useCard();
return (
You swiped to the {swipeDirection}
);
}
```
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.