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

Create useCard custom hook

Đang mở
#5 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
JavaScript
Star
14
Fork
3
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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}


);
}
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.