Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 8c9c44d

Browse files
committed
CR feedback
1 parent 7d7e12a commit 8c9c44d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ With the CodePush plugin downloaded and linked, and your app asking CodePush whe
406406

407407
The simplest way to do this is to "CodePush-ify" your app's root component. To do so, you can choose one of the following three options:
408408

409-
**Option 1: Call `codePush` on your root component and assign the result to itself after the component declaration:**
409+
**Option 1: Wrap your root component using the `codePush` decorator function:**
410410

411411
```javascript
412412
import codePush from "react-native-code-push";
@@ -459,14 +459,17 @@ class MyApp extends Component {
459459
MyApp = codePush(CodePushOptions)(MyApp);
460460
```
461461

462-
Alternatively, if you don't want CodePush to trigger checking for updates automatically for you, but want to trigger it manually in app code in response to some event (e.g. a button press), you can specify a `MANUAL` check frequency and do the following:
462+
Alternatively, if you don't want CodePush to trigger checking for updates automatically for you, but want to trigger it manually in app code in response to some event (e.g. a button press), you can specify a `MANUAL` `checkFrequency` and call [`CodePush.sync()`](#codepushsync) with your desired `SyncOptions`:
463463

464464
```javascript
465465
let codePushOptions = { checkFrequency: codePush.CheckFrequency.MANUAL };
466466

467467
class MyApp extends Component {
468468
onButtonPress() {
469-
codePush.sync();
469+
codePush.sync({
470+
updateDialog: true,
471+
installMode: codePush.installMode.IMMEDIATE
472+
});
470473
}
471474

472475
render() {

0 commit comments

Comments
 (0)