ajenkins / ajenkins/react-native-dynamic-deck-swiper
Create useCard custom hook
Đang mở
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á.