Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

`active:` not working with `Pressable`'s `testOnly_pressed`

Ouverte
#240 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 3 jours

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
45/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
react-native, typescript
Domaine
frontend, mobile

Piste de recherche

Start by running the linked reproduction at pvinis/nativewind-pressable-active and confirm that a Pressable with active:bg-red-500 ignores the testOnly_pressed prop. Then find where the library decides whether the active variant applies, and check whether it reads the pressed state that Pressable reports at runtime. Done means the active style also applies when testOnly_pressed is set, with the existing tap behaviour unchanged.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

deferred (post-5.0)

Describe the bug
active: doesnt work with testOnly_pressed. Specifically, if I have a Pressable with bg-green active:bg-red-500, when I tap that button, it will change color. But if I pass the testOnly_pressed prop to it, to simulate being pressed, then the color will not be the red one.
This makes it hard to have storybook for buttons.

Reproduction
https://github.com/pvinis/nativewind-pressable-active

Expected behavior

should be like

screenshot-2025-11-06-17 53 41@2x

but its like

screenshot-2025-11-06-17 53 32@2x

Additional context
Add any other context about the problem here. If applicable, add screenshots to help explain your problem.

Langage dominant
TypeScript
Étoiles
166
Forks
45
Merge moyen
13 j 14 h
PR mergées (30 j)
1

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de nativewind/react-native-css

Toutes les issues de nativewind/react-native-css

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.