react-native-code-push icon indicating copy to clipboard operation
react-native-code-push copied to clipboard

functional component codePushStatusDidChange is stuck on 4

Open appsMerwas opened this issue 2 years ago • 5 comments

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

appsMerwas avatar Apr 18 '22 11:04 appsMerwas

+1 same issue

mohammad-hazim avatar Apr 19 '22 06:04 mohammad-hazim

+1 same issue any one can help ???

ferasabufares avatar Apr 20 '22 08:04 ferasabufares

+1 same

AlpMehmet avatar May 16 '22 08:05 AlpMehmet

+1 :)

clementinoux avatar Jul 10 '22 00:07 clementinoux

+1 Same issue, any update on this?

daba-faith avatar Jul 10 '22 09:07 daba-faith

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.

ghost avatar Sep 08 '22 13:09 ghost

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.

ghost avatar Sep 23 '22 18:09 ghost

Same issue here

asamiz avatar Jan 05 '23 10:01 asamiz

+1 same issue

harish92 avatar May 22 '23 10:05 harish92

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

wfl-junior avatar Sep 27 '23 23:09 wfl-junior

+1

ParthDev96 avatar Nov 05 '23 05:11 ParthDev96