airbnb / airbnb/native-navigation

Navigator.dismiss(payload) does not provide payload to Promise<NavigationResult>

Open
#142 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
3.1k
Forks
173
PR merge metrics
No merged PRs in 30d

Description

When calling `dismiss(payload)`, the payload object is never available as a return value to the `Navigator.present` Promise.

```js
// screen_a.js
Navigator.present(SCREEN_B).then(result => {
console.info(result)
// { code: -1 }
})

// screen_b.js
Navigator.dismiss({ success: true })
```

No matter what I provide to `dismiss`, all I ever get is the `NavigationResult` code and never a `payload` key.

Is this feature not yet functioning or am I missing something from the [docs](https://github.com/airbnb/native-navigation/blob/6654f4e9d9038a02ac1575951ea31046daf14313/docs/api/navigator/dismiss.md)?

Contributor guide

Open the contributing guide

Research direction

Start with docs/api/navigator/dismiss.md and the Navigator.present/dismiss entry points described in the issue. Trace how dismiss(payload) reaches the present Promise and verify that the completed result exposes the payload alongside the NavigationResult code.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.