You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -735,16 +735,16 @@ This decorator provides support for letting you customize its behaviour to easil
735
735
// Fully silent update which keeps the app in
736
736
// sync with the server, without ever
737
737
// interrupting the end user
738
-
@codePush()
739
738
classMyAppextendsComponent {}
739
+
codePush()(MyApp);
740
740
```
741
741
742
742
2. **Silent sync everytime the app resumes**. Same as 1, except we check for updates, or apply an update if one exists every time the app returns to the foreground after being "backgrounded".
3. **Interactive**. When an update is available, prompt the end user for permission before downloading it, and then immediately apply the update. If an update was released using the `mandatory` flag, the end user would still be notified about the update, but they wouldn't have the choice to ignore it.
@@ -753,16 +753,15 @@ This decorator provides support for letting you customize its behaviour to easil
4. **Log/display progress**. While the app is syncing with the server for updates, make use of the `codePushStatusDidChange` and/or `codePushDownloadDidProgress` event hooks to log down the different stages of this process, or even display a progress bar to the user.
761
761
762
762
```javascript
763
763
// Make use of the event hooks to keep track of
764
764
// the different stages of the sync process.
765
-
@codePush()
766
765
classMyAppextendsComponent {
767
766
codePushStatusDidChange(status) {
768
767
switch(syncStatus) {
@@ -788,6 +787,7 @@ This decorator provides support for letting you customize its behaviour to easil
788
787
console.log(progess.receivedBytes+" of "+progress.totalBytes+" received.");
0 commit comments