ajenkins / ajenkins/react-native-dynamic-deck-swiper
Create useCard custom hook
Open
enhancement
- Dominant language
- JavaScript
- Stars
- 14
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
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}
);
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.