Skip to content

Commit 88d325d

Browse files
author
Richard Hua
authored
Update README.md
1 parent cfa437b commit 88d325d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -722,10 +722,12 @@ When you require `react-native-code-push`, the module object provides the follow
722722
#### codePush
723723
724724
```javascript
725-
codePush(options: CodePushOptions)(rootComponent: React.Component): React.Component;
725+
codePush(options: CodePushOptions)(rootComponent: React.Component): React.Component; // Wrapper function
726+
727+
@codePush(options: CodePushOptions) // Decorator; Requires ES7 support
726728
```
727729
728-
Used as a decorator to wrap a React component inside a "higher order" React component that knows how to synchronize your app's JavaScript bundle and image assets with the latest release to the configured deployment when it is mounted. Internally, the wrapper component calls [`sync`](#codepushsync) inside its `componentDidMount` lifecycle handle, which in turns performs an update check, downloads the update if it exists and installs the update for you.
730+
Used to wrap a React component inside a "higher order" React component that knows how to synchronize your app's JavaScript bundle and image assets when it is mounted. Internally, the higher-order component calls [`sync`](#codepushsync) inside its `componentDidMount` lifecycle handle, which in turns performs an update check, downloads the update if it exists and installs the update for you.
729731
730732
This decorator provides support for letting you customize its behaviour to easily enable apps with different requirements. Below are some examples of ways you can use it (you can pick one or even use a combination):
731733

0 commit comments

Comments
 (0)