ajenkins / ajenkins/react-native-dynamic-deck-swiper
Create useCard custom hook
Abierto
enhancement
- Lenguaje dominante
- JavaScript
- Estrellas
- 14
- Forks
- 3
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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}
);
}
```
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.