Platform colors wont work (reanimation error) when used with transitions
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 22/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Calme
- Stack technique
- javascript, react-native, tailwindcss
- Domaine
- mobile-dev
Piste de recherche
The failure is a Reanimated worklet error when a platformColor from tailwind.config is animated through a transition-property class. Start by reproducing with the stackblitz linked in the issue on an iOS target, then trace how platform colors are resolved in the Tailwind config and the transition handling in the nativewind runtime. Done means the transition runs on iOS without the non-worklet 'removeListener' error.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Describe the bug
If you define a color in the tailwind.config.ts e.g. platformColor("systemRed") as shown [here] (https://www.nativewind.dev/customization/colors) and you have an a element that has a classname that uses a transition property you will get the following error from react-reanimated ReanimatedError: [Reanimated] Tried to synchronously call a non-worklet function 'removeListener' on the UI thread.. I understand that transitions are still experimental so I wanted to put this on your radar.
Reproduction
I cant exactly reproduce this on stackblitz as it needs to be running in an ios enviroment but I have put together a stacblitz demo here so you can better understand the code and the issue.
Expected behavior
I would expect the platform color transpiled ahead of time so it would not need to be called during the animtion in the ui thread and thus not break.
Additional context
I'm using expo 52.0.23 with nativewind 4.1.3 and react-native 0.76.5 with react 18.
- Langage dominant
- JavaScript
- Étoiles
- 8.1k
- Forks
- 409
- Merge moyen
- 1 j 15 h
- PR mergées (30 j)
- 1
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de nativewind/nativewind
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
nativewind/nativewind#1879 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
nativewind/nativewind#1878 ·
-
`withNativewind(config, { globalClassNamePolyfill: undefined })` turns the className polyfill offOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
nativewind/nativewind#1877 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
nativewind/nativewind#1870 · 4 réactions ·
-
printUpgradeWarning crashes the app when serializing props that contain a context object with a throwing getter (e.g. React Navigation)Peut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverteneeds investigation needs reproduction
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
nativewind/nativewind#1812 · 5 commentaires ·
Toutes les issues de nativewind/nativewind
Issues similaires
-
step.duration reflects only the last retry attempt (HelperStep.run() overwrites startTime)Peut-être pris @mirao l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
codeceptjs/CodeceptJS#5774 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
-
Status: Unconfirmed
Difficulté 1/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
AllTheMods/ATM10-Aeronautics#151 ·
Les mainteneurs répondent en général sous 4 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
feimacode/open-design-agent-kit#66 ·
Les mainteneurs répondent en général sous 1 jour