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

Codepush HOC should unmount app before restart

Open savv opened this issue 1 year ago • 4 comments

RN Apps currently don't get the opportunity to destruct themselves prior to a restart, leading to crashes and bugs:

https://github.com/microsoft/react-native-code-push/issues/2567#issuecomment-1820827232

This is an attempt to mitigate these crashes, by properly unmounting <App />.

I'm looking forward to your feedback

savv avatar Nov 21 '23 12:11 savv

@microsoft-github-policy-service agree

savv avatar Nov 21 '23 12:11 savv

ping?

savv avatar Nov 30 '23 09:11 savv

this is not missing the state in the class construtor?

      constructor() {
        super();
        this.state = { inactive: false };
      }

viniciusmoreria avatar Dec 12 '23 17:12 viniciusmoreria

@savv Thank you for this contribution! I'm a bit concerned that we may affect existing apps with this change. I think it would be a good idea to put this change behind an option (for now), what do you think?

velimir-jankovic avatar Dec 13 '23 11:12 velimir-jankovic

Closing as stale.

DmitriyKirakosyan avatar Jun 03 '24 08:06 DmitriyKirakosyan