Skip to content

v1.14.1-beta

Compare
Choose a tag to compare
@geof90 geof90 released this 03 Aug 00:49
· 633 commits to master since this release

This release primarily adds a decorator function which can be used to wrap your root component in a higher order component that handles syncing updates with the CodePush server. Refer to the README for ways to use it.

New Features

  1. The default export of react-native-code-push can now also be used as a decorator function which takes in some options and wraps your root component in a higher order "CodePush" component. This component then handles syncing with the server for updates for you. Internally, the higher order component calls codePush.sync() at the right trigger events (e.g. when the app resumes). It also ensures that notifyAppReady() is called when the component mounts, so issues like #360 wouldn't happen.

Going forward, we intend to have this new decorator function be the primary way in which users instrument their app with CodePush instead of calling codePush.sync() directly, although the old method still works and can be used.