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
- 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 callscodePush.sync()
at the right trigger events (e.g. when the app resumes). It also ensures thatnotifyAppReady()
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.