iOS: a recycled EaseView loses overflow: 'hidden' and borderRadius

Ouverte
#72 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

@el-lsan y travaille déjà.

Depuis le 8/11/2026.

  • #73 par @el-lsan — ouverte

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
25/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
À l'abandon
Stack technique
ios, react-native, typescript
Domaine
mobile

Piste de recherche

The issue identifies prepareForRecycle and the retained _props behavior in RCTViewComponentView as the failing path; start by tracing how EaseView’s iOS recycling code resets layer properties and compare it with React Native’s prop reapplication behavior. The issue links a reproducing example under example/app/issues; use the unmount/remount steps with unchanged styles to verify the fix. Done means the remounted view clips its oversized child with rounded corners; pull request #73 is already open against this issue.

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

Description

Description

On iOS (new architecture), an EaseView that is unmounted and later mounted again can lose its overflow: 'hidden' and borderRadius. The reused view no longer clips its children and has square corners. In our app this showed up after some navigation as a background image spilling out of rounded buttons and switches.

Cause: prepareForRecycle resets layer properties that RCTViewComponentView owns (masksToBounds, cornerRadius, backgroundColor, borders, shadow, opacity and transform). RCTViewComponentView keeps _props across recycling and only applies a style value again when it changes. So when the recycled view is mounted with the same style, overflow: 'hidden' and borderRadius look unchanged to React Native and are never set on the layer again.

Expected: the remounted view clips its children with rounded corners, like the first mount.

Before and after

Steps to reproduce
  1. Render an EaseView with overflow: 'hidden' and borderRadius, and a child larger than it (for example a 300x300 view inside a 160x64 pill).
  2. Unmount it.
  3. Mount it again with the same props.
  4. The child is no longer clipped and the corners are square.
const [shown, setShown] = useState(true);

{shown && (
  <EaseView
    animate={{ opacity: 1 }}
    transition={{ type: 'timing', duration: 200 }}
    style={{ width: 160, height: 64, borderRadius: 32, overflow: 'hidden' }}
  >
    <View style={{ width: 300, height: 300, backgroundColor: 'red' }} />
  </EaseView>
)}
<Pressable onPress={() => setShown((s) => !s)}>
  <Text>Toggle</Text>
</Pressable>
Snack or a link to a repository

The snippet above is the whole repro. The same repro as an example screen, with the fix: https://github.com/el-lsan/react-native-ease/tree/fix/ios-recycle-keeps-clipping/example/app/issues (a pull request follows).

react-native-ease version

0.9.0

React Native version

0.88.1

Platforms

iOS

Architecture

New Architecture (Fabric)

Build type

Release (also seen in debug)

Device

iOS simulator and a real device

Device model

iPhone SE (2nd generation) simulator, iOS 27.0; iPhone 15 Pro Max, iOS 27.0.1

Acknowledgements

Yes, I searched for similar issues. The closest is #54 (a loop surviving on a recycled view), a different symptom in the same recycling path.

Langage dominant
TypeScript
Étoiles
998
Forks
17
Merge moyen
1 j 7 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 appandflow/react-native-ease

Toutes les issues de appandflow/react-native-ease

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.