ajenkins / ajenkins/react-native-dynamic-deck-swiper
Create useCard custom hook
未关闭
enhancement
- 主要语言
- JavaScript
- 星标
- 14
- 派生
- 3
- PR 合并指标
- 30 天内没有已合并 PR
描述
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}
);
}
```
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。