react-native-code-push
react-native-code-push copied to clipboard
functional component codePushStatusDidChange is stuck on 4
I'm trying to turn off the loader once it reach status 0.
codePushStatusDidChange is getting called only once with the status as 4
it is work fine with class component but when i use functional component it is stuck on 4
const App = () => {
const [isLoading, setIsLoading] = useState(true);
async function checkCodePushAndSync() {
try {
await codePush.sync(
{
installMode: codePush.InstallMode.IMMEDIATE,
},
status => {
console.log('status', status);
if (status == 0) {
setIsLoading(false);
}
},
);
} catch (error) {
console.log('error', error);
}
}
// did mount
useEffect(() => {
checkCodePushAndSync();
}, []);
if (isLoading) {
return <PageLoader />;
} else {
return (
<>
**********
</>
);
}
};
export default codePush({
checkFrequency: codePush.CheckFrequency.ON_APP_START,
installMode: codePush.InstallMode.IMMEDIATE,
})(App);
Environment
- react-native-code-push version:7.0.4
- react-native version:0.67.2
- iOS/Android/Windows version: Android
- Does this reproduce on a debug build or release build? both
- Does this reproduce on a simulator, or only on a physical device? physical device
+1 same issue
+1 same issue any one can help ???
+1 same
+1 :)
+1 Same issue, any update on this?
This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment.
This issue will now be closed because it hasn't had any activity for 15 days after stale. Please feel free to open a new issue if you still have a question/issue or suggestion.
Same issue here
+1 same issue
This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment.
This issue will now be closed because it hasn't had any activity for 15 days after stale. Please feel free to open a new issue if you still have a question/issue or suggestion.
This issue will now be closed because it hasn't had any activity for 15 days after stale. Please feel free to open a new issue if you still have a question/issue or suggestion.
same issue here
+1