Skip to content

Commit 4467f2e

Browse files
committed
Update documentation for getLatestReferringParams
1 parent 4a3431a commit 4467f2e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,21 +504,27 @@ These session parameters will be available at any point later on with this comma
504504
#### Method
505505

506506
```js
507-
branch.getLatestReferringParams()
507+
branch.getLatestReferringParams(synchronous = false)
508508
```
509509

510510
##### Return
511511

512512
A promise. On resolution, the promise returns an object containing the parameters
513513
from the latest link open or install. See [Params object](#params-object) for
514-
details on the contents.
514+
details on the contents. Depending on the value of the argument, the promise may
515+
return right away, possibly with values from the user defaults (iOS) or user
516+
preferences (Android) or wait until an open response is received.
515517

516518
#### Example
517519

518520
```js
519521
import branch from 'react-native-branch'
520522

523+
// don't wait for open response
521524
const latestParams = await branch.getLatestReferringParams()
525+
526+
// wait for open response
527+
const latestParams = await branch.getLatestReferringParams(true)
522528
```
523529

524530
___

0 commit comments

Comments
 (0)