Skip to content

Instantly share code, notes, and snippets.

@oliviachang29
Last active May 4, 2019 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oliviachang29/84e9a44db5f1ddf8293a747b9dc89f64 to your computer and use it in GitHub Desktop.
Save oliviachang29/84e9a44db5f1ddf8293a747b9dc89f64 to your computer and use it in GitHub Desktop.
CodePushComponent.js
import React from 'react'
import codePush from 'react-native-code-push'
let codePushOptions = { installMode: codePush.InstallMode.ON_NEXT_RESUME, checkFrequency: codePush.CheckFrequency.ON_APP_RESUME }
export class CodePushComponent extends React.Component {
componentDidMount() {
codePush.sync()
}
render () {
return null
}
}
CodePushComponent = codePush(codePushOptions)(CodePushComponent)
module.exports = CodePushComponent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment