software-mansion / software-mansion/react-native-screens

Discard behaviors with new iOS 26 header buttons

Open
#3,401 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

missing-info missing-repro platform:ios
Dominant language
TypeScript
Stars
3.7k
Forks
714
Avg merge
2d 23h
Merged PRs (30d)
71

Description

I think we would need some native code to do this? Cause even that there is https://github.com/dominicstop/react-native-ios-context-menu, those buttons are defined here unstable_headerRightItems so we don't have access to refs or anything. Probs easier to do natively? We already have usePreventRemove btw, but imo hard to use to achieve this effect with the new buttons. See the video:

https://github.com/user-attachments/assets/141abf91-650b-4c97-b3f2-a8251a9681a0

cc @johankasperi maybe :D

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing unstable_headerRightItems and comparing its behavior with usePreventRemove, then inspect the existing native iOS handling. The linked video shows the target behavior; done means defining and implementing how new iOS 26 header buttons should honor discard behavior and validating that flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, react-native, typescript
Domain
mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.