Last active
May 4, 2019 17:14
-
-
Save oliviachang29/84e9a44db5f1ddf8293a747b9dc89f64 to your computer and use it in GitHub Desktop.
CodePushComponent.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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