ajenkins / ajenkins/react-native-dynamic-deck-swiper

Create useCard custom hook

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.